How to read Windows registered username using PHP / IIS

I am running a network. Here I have a domain controller (DC) on which I just installed IIS6, PHP and Mysql. everything works fine. :)

Now I want to open a script on this local website. The first problem is that I want to determine which network user (active directory user) is logged in with PHP. I mean, for me, when a user logs into Windows, it’s enough that there is no need for another authentication.

I was wondering if I could just use some function or something else ... that its output is the username and user group of AD.

+7
source share
2 answers

If you have installed IIS for user authentication, one or more of them must contain the username:

$_SERVER['LOGON_USER'] $_SERVER['AUTH_USER'] $_SERVER['REDIRECT_LOGON_USER'] $_SERVER['REDIRECT_AUTH_USER'] 
+16
source

I try this, but it shows me a computer, not a Windows PLS User Guide

-one
source

All Articles