Authenticating Window's users?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
danielwalters6
Forum Commoner
Posts: 31
Joined: Fri May 11, 2007 1:17 pm
Location: Cambridge, England, UK

Authenticating Window's users?

Post by danielwalters6 »

I'm planning to create a web-based IT Room booking application for my college.
Eventually I wish for the application to use PHP to interact with a mysql database, to display times when the room is booked etc and when the room is free.

Before the main page is displayed, I would like the Windows account to be authenticated...

If a student, then a read-only timetable is displayed. Or if a tutor then a editable booking table appears.

If it's not possible to find the group the user belongs to, then if I can find, display and test the username that would also work.

Students at the college have distinct login's. They begin with two digits. "98" or "99" or "01" or "02" or "05" or "07" etc. (The 00's are the year they entered the college")
The staff's usernames don't have any particular pattern.

I know this is possible using "aspx" I'm presuming the same is possible using PHP.

TIA

Dan Walters
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

danielwalters6 wrote:I know this is possible using "aspx"
You mean Request.ServerVariables("LOGON_USER") ?
danielwalters6 wrote:I'm presuming the same is possible using PHP
Under certain circumstances the same value is stored in $_SERVER['AUTH_USER']. see http://www.php.net/manual/en/reserved.variables.php
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

I believe you can access this info in $_SERVER array if you're running under IIS. For Apache, you will need to install and configure mod_ntlm.

Google for "allintext:iis php ntlm" and "allintext:apache php ntlm"
Post Reply