I'm new to PHP and I am writing my first web development project with it. My project is something that will only be used on our Intranet by a few select members.
Instead of being bothered with logon screens and passwords, I'd rather just get the username of the person who's logged into Windows and run that against the database.
So my question is, how do I, or is it even possible to, get the username from the Windows session?
Changes are not permanent, but change is. {Neil Peart}
I think this can be done, but it the server needs to be running IIS. As far as i remeber there is an option in IIS that allows you to change the permissions of the website and select an authentication method.
However this only allows people within the LAN to access the site.
Well as I said, it would be an Intranet only site. Thanks for the link but I was hoping I didn't have to do anything on that level. Deailing with kerberos, hashes, and such.
I planned on having a table in mySQL database which listed the users who could have access to this site. If I was able to retrieve the plaintext username of the person who is logged onto the computer, I'd just crosscheck that with the SQL table. If the name matches, you may pass go.
Something along the lines of this VB6 sample would work nicely. Can PHP do something like this?
VB Code:
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
Changes are not permanent, but change is. {Neil Peart}
Sorry John, but I setup notifications for this thread and never received one for your last post. Huh. Since I never bothered checking this thread for a few days, I've moved on to another method; using sessions. If that fails me then I'll come back and try your idea using IIS. In the meantime I'll mark this thread as resolved.
Changes are not permanent, but change is. {Neil Peart}