Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Action Hook for WHMCS which allows adding an user to LDAP when they are added as a client.
branch: master
Failed to load latest commit information.
.gitattributes Initial Commit
.gitignore Initial Commit
README.md Update README.md
changepassword.php added ssha
ldap.php added SSHA

README.md

Major Components:

  • changepassword.php - Searches for a WHMCS user's account in LDAP (with a matching email address) and changes that password when the password is changed in WHMCS.
  • ldap.php - Creates users in LDAP when they are created in WHMCS.

Installation:

  • You will need to modify this script to match your own schema. I used phpLDAPadmin, exported an user, then copied the fields into the script exactly. Also, you will need to change the DN settings to match your own login information.
  • For ldap.php, you will also need to create a custom field for the user's LDAP username. Part of the code does a mysql query to find the user's LDAP username which corresponds to the userID which WHMCS returns.
  • Add the modified script to your whmcs/includes/hooks directory.

Debugging:

  • You can use the WHMCS activity log. The script will create an entry if it fails. However, you may want to set static variables for each of the items in the function and try to add an user.
Something went wrong with that request. Please try again.