Jump to content

Getting windows username?


wlogeshwaran

Recommended Posts

There is a way to retrieve the Window's username using VBScript, but that doesn't work when accessed through the HTTP protocol or for any other browser than IE. You mentioned it's an Intranet site though, so I guess that's ruled out.

Link to comment
Share on other sites

You can retrieve a Windows username in PHP providing you are using HTTP authentication and your user has logged in accordingly. There username will turn up within $_SERVER['PHP_AUTH_USER'].

 

How would you validate the details are correct?

Link to comment
Share on other sites

Yeah.. You'd need an LDAP server installed and set-up with the required users' details replicated as LDAP entries, that you can then form a request to validate the login. Be aware this method would require you to maintain the LDAP server whenever someone changes their password or username. The point I was getting at was that there's no way of retrieving the actual, real-time Windows username; though thorpe you were more constructive in your answer.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.