$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;
}
}