Jump to content

PHP with AD User Groups Question.


01hanstu

Recommended Posts

Hi,

I know very little about binding PHP to AD. At the minute it is setup to Authenticate against AD (Via IIS), then from the that I have the following:

 

Declare's the Logon_Name variable, so that it can be used to 'print' buttons, and links i.e. if ($logon_name==("Administrator")); {echo admin link here'};

 

$logon_name = basename($_SERVER['AUTH_USER']);

 

What I would ideally like to do is be able to find the group the user is a member of, this way we can create custom AD groups like intra_admin and then if they are a member they will be able to see certain links to pages etc.

 

Any ideas, I hope this makes sence

Link to comment
Share on other sites

You 'll need to look into ldap. I haven't got any code on me at the moment because I'm at home but I have a pretty simple example at work.

 

Basically, you use the username that you have to search through ldap and find what groups the user belongs too.

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.