I am using LDAP as my source for users. This works fine, and everyone can simply log in using their LDAP info, and it will create a Drupal user for that person. However, one of our requirements is during user registration how to check this user already in ldap server or not , means is there any API by which i can check this user already in ldap server on user registration.

  • what is your drupal version? Sep 27, 2016 at 19:04

1 Answer 1


The LDAP module can handle that for you.

  • In my scenario user is crating by custom module so i need check user is already in ldap server or not if not then new user created as drupal user.
    – Fawwad
    Oct 20, 2014 at 5:53
  • Fair enough... the LDAP module contains the only good API I know of, but you can use the php ldap_connect() and ldap_search() if you want to do it manually
    – Darvanen
    Oct 20, 2014 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.