Authentication return values
Posted: Tue May 09, 2006 6:38 pm
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
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