Authentication return values

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Authentication return values

Post by alex.barylski »

mysql_connect, etc...

Most functions return some sort of resource handle or ID, likely not gauranteed unique...what I mean by unique is, you run a script, connect using test, test as your user/pass and then try it again "it's possible" the resource ID isn't the same as last time...

Is there a way to have authentication functions like mysql_connect() to ALWAYS return a consistent UID without moifying the source...

Basically given a connection resource to either MYSQL, FTP, SMTP, etc...I need to be able to determine the user that logged in...

Not nessecarily the user/pass, but an ID which is gauranteed unique to that user only...

Anyone know if the protocols offer a get_user_id() type function or similar???

No hacks!!!

Cheers :)
Post Reply