Page 1 of 1

Accessing Windows Login using php??????

Posted: Wed Apr 07, 2004 12:13 am
by deadpool_19
I have searched and searched in a feeble attempt to find a method to access the username of the windows user currently logged into windows. I have no idea if this can even be done.
Thanx for trying to help

Deadpool

Posted: Wed Apr 07, 2004 3:13 am
by twigletmac
Do:

Code: Select all

echo '<pre>';
print_r($_SERVER);
echo '</pre>';
if it's anywhere it'll be in $_SERVER.

Mac

Posted: Wed Apr 07, 2004 10:57 am
by feyd
Are you looking to see the remote user, or the server's user?

Remote isn't quite simple unless you are on a LAN with it.

in Win32, GetUserName() and GetUserNameEx() are used to query the calling threads username. LookupAccountName() could also be useful.

auth class

Posted: Thu Apr 08, 2004 1:59 am
by djot
-
Hi,

perhaps this will help also:

http://www.phpclasses.org/browse/package/1556.html
This class is meant to validate the access of an authenticated user to page a page associated with a given Windows Active directory group ...
djot
-

Posted: Thu Apr 08, 2004 2:00 am
by m3mn0n

Posted: Mon Apr 19, 2004 7:52 am
by jetze
I recently posted a thread about this subject too. If you are only looking for the username, you can easily get it from the constant variable $HTTP_ENV_VARS["USERNAME"]