Page 1 of 1

AUTH_USER Help

Posted: Tue Dec 01, 2009 9:59 am
by fraz
Hi all, i am able to retrieve the username and domain with this code :

echo $_SERVER["AUTH_USER"];

But i just need to gave the username, how can i seperate the domain and username ?

I run with SQL 2005 and php 5.0

Re: AUTH_USER Help

Posted: Tue Dec 01, 2009 10:17 am
by AbraCadaver

Code: Select all

list($domain, $user) = explode('/', $_SERVER['AUTH_USER']);
Or (this is not what it is meant for, but it works fine):

Code: Select all

$user = basename($_SERVER['AUTH_USER']);
-Shawn