Jump to content

Recommended Posts

Chaps,

Is there a simple way that PHP can retrieve (guessing with LDAP??) the username of a user viewing a page?

Basically, am running a network, and AD pops up a php file when users log on, prompting them to download a file, which is locally hosted.  I simply want to get the username of the domain user, and then append it to the end of a file, so I have a list of all users who have downloaded the file.

LDAP is something I've been meaning to read up on for a while - but realised I'm supposed to have this script implemented by tomorrow morning - I see a fun evening VPNing onto the work network :(

Many thanks in advance,
Ed Ludlow
Link to comment
https://forums.phpfreaks.com/topic/35246-ldap-get-active-directory-username/
Share on other sites

Thanks.

I've just realised that wasn't a very clear account of what I'm trying to do, sorry!

What happens is...
A user logs onto an active directory domain.  When they log on, a PHP file opens in a browser window (all done through group policies) which then asks users to download a certain file.  What I am wondering is if PHP can get the user's AD username, and then with that I can write it to a log file so I know which domain users have downloaded the file.

Hope that makes more sense!

Thanks,
Ed Ludlow
UNLESS you mean (when you refer to running a network) the login page that you'd get if you set a password on Windows itself, not just a general web-based login screen or HTTP auth? If that's the case, I'm really not sure it's possible due to permissions looking at/reading the local filesystem.

am i missing the point totally?
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.