Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    5

    Unanswered: need guidance in ldap for php

    hi all, recently i was given a project that involves php and Active Directory (win 2k server). One of the goals of this project is the ability to automatically redirect users who are logged in to the AD to a web page.

    my question is, can i use ldap function in php to fetch the current logged on user in the active directory? do ask if my question is not clear. thanx.

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: need guidance in ldap for php

    Originally posted by b3njo
    hi all, recently i was given a project that involves php and Active Directory (win 2k server). One of the goals of this project is the ability to automatically redirect users who are logged in to the AD to a web page.

    my question is, can i use ldap function in php to fetch the current logged on user in the active directory? do ask if my question is not clear. thanx.
    Yes it is possible because Active Directory is an LDAP implementation.
    But it will be hard work, because Active Directory has a difficult structure. (in my opinion)

    IMHO better way is replication of Active Directory to another LDAP and PHP will be binding to the replica.

  3. #3
    Join Date
    Dec 2003
    Posts
    5
    i never worked on ldap before so im not sure how hard it is, but here's a sample:

    - user logged on to domain w/ username: user1 & password: blank
    - a php page automatically opened, the code in this page will detect the username, compare it with username in a mysql dbase and then redirect the page to a custom page that displays information relevant to the user.

    i really need help on how to make php detect the username.

  4. #4
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482
    Originally posted by b3njo
    i never worked on ldap before so im not sure how hard it is, but here's a sample:

    - user logged on to domain w/ username: user1 & password: blank
    - a php page automatically opened, the code in this page will detect the username, compare it with username in a mysql dbase and then redirect the page to a custom page that displays information relevant to the user.

    i really need help on how to make php detect the username.
    PHP is server side running script not client side so you can't automaticaly detect the username on client. So you need to find another way how to do that.

    1. Startup script on Windows domain which automaticaly run iesxplore with url and username in parameters

    2. If Javascript can check OS username, then simply on the first page check OS username using Javascript and then call (redirect to) another script with username as input parameter.

    3. Some Single-signon product

    Imho best way is Nr. 3 (For example SunOne Identity server where LDAP is also included)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •