Ldap + Php example of connection

Asked

Viewed 549 times

2

I’m trying to make a simple connection and pick up if certain user is in ldap.

However I am not succeeding, I searched on the net and I could not find any script to help me.

  • When you say "catch," do you mean "authenticate"? Or just know if it exists?

  • What type of application did you want? Do you want to perform authentication or just perform a user query in LDAP?

  • 1

    http://php.net/manual/en/function.ldap-bind.php#refsect1-Function.ldap-bind-examples

  • Know if there is the user, and also would like to get all users of the directory

  • Please post the code you are using and explain the difficulty.

1 answer

1

There’s a library I’ve used in a project, it calls adLDAP

EXAMPLE

$config = array(
    'account_suffix' => "@gatech.edu",

    'domain_controllers' => array("whitepages.gatech.edu"),

    'base_dn' => 'dc=whitepages,dc=gatech,dc=edu',

    'admin_username' => '',

    'admin_password' => '',
);

$ad = new Adldap($config);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.