Re: How to get the HTTP authenticated user name?

From: Date: Wed, 16 Apr 2008 15:17:44 +0000
Subject: Re: How to get the HTTP authenticated user name?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-273084@lists.php.net to get a copy of this message
On Wed, Apr 16, 2008 at 5:37 AM, Georgios Kasapoglou <gkasap@intracom.gr> wrote: > Hi all, > I'm new to the list. > I'm running on Apache 2 and I want to use the mod_auth_basic module, which > authenticates the user. > But I need the username to use it in my php script. How can I? > Is there any php command or variable that keeps this info? > I searched my browser whether a cookie is created, but unfortunately there > isn't STFA - This comes up every couple of months or so. http://marc.info/?w=2&r=1&s=php+auth+user&q=t As Per indicated, it should be in $_SERVER. If memory serves correctly, it should be something like $_SERVER['AUTH_USER'] or $_SERVER['PHP_AUTH_USER']. -- </Daniel P. Brown> Ask me about: Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo., and shared hosting starting @ $2.50/mo. Unmanaged, managed, and fully-managed!

« previous php.general (#273084) next »