I have set up a basic authentication on one section of my website as documented here, it works fine, but now I need to be able to access the user name in order to filter certain results. But $_SERVER['PHP_AUTH_USER']
wont work. Is there any other way to see who is logged in?
My .htaccess file:
AuthType Basic
AuthName "You need to login to access this page."
AuthUserFile /usr/local/..../.htpasswd
Require valid-user
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
It is marked as duplicate, but I don't see where is the answer to my problem? Can someone help please? Admin?