From fa77356969e7d4f1d48b1a6b84ca636b5a7390d2 Mon Sep 17 00:00:00 2001 From: Stricted Date: Fri, 21 Feb 2014 06:01:37 +0100 Subject: [PATCH] update ldap class --- LDAP.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LDAP.class.php b/LDAP.class.php index 32588ab..491e260 100644 --- a/LDAP.class.php +++ b/LDAP.class.php @@ -71,10 +71,11 @@ class LDAP { $user['uidNumber'] = '5001'; $user['loginShell'] = '/bin/bash'; $user['mail'] = 'test@user.com'; - $user['userPassword'] = ''; + $user['userPassword'] = ''; // use ldap hash class to generate a password + or see here: http://techiesf1.blogspot.de/2012/03/add-ldap-user-from-php.html */ if (is_array($user) && !empty($user)) { - if (ldap_add($this->ldap, $this->dn, $user) { + if (ldap_add($this->ldap, "uid=".$user['uid'].",".$this->dn, $user) { return true; } } -- 2.20.1