diff options
author | Michael Hamann <michael@content-space.de> | 2011-02-24 23:27:24 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2011-02-24 23:27:24 +0100 |
commit | f77fc90de1e477b721442757cd7413f91cccc044 (patch) | |
tree | 2abb734dacf39419b96b6b70c65115de57228fc3 /inc/adLDAP.php | |
parent | b8c040db1fdc0eee80963e57d95a15fd3813912d (diff) | |
parent | bd07158f0f2569ae470f980dd49d69b7f1fd2c49 (diff) | |
download | rpg-f77fc90de1e477b721442757cd7413f91cccc044.tar.gz rpg-f77fc90de1e477b721442757cd7413f91cccc044.tar.bz2 |
Merge branch 'master' into indexer_rewrite
Conflicts:
inc/fulltext.php
inc/indexer.php
lib/exe/indexer.php
Diffstat (limited to 'inc/adLDAP.php')
-rw-r--r-- | inc/adLDAP.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/inc/adLDAP.php b/inc/adLDAP.php index 4c8ee5db3..a64096b85 100644 --- a/inc/adLDAP.php +++ b/inc/adLDAP.php @@ -1183,8 +1183,17 @@ class adLDAP { $add=array(); $add["unicodePwd"][0]=$this->encode_password($password); - $result=ldap_mod_replace($this->_conn,$user_dn,$add); - if ($result==false){ return (false); } + $result=@ldap_mod_replace($this->_conn,$user_dn,$add); + if ($result==false){ + $err = ldap_errno($this->_conn); + if($err){ + $msg = 'Error '.$err.': '.ldap_err2str($err).'.'; + if($err == 53) $msg .= ' Your password might not match the password policy.'; + throw new adLDAPException($msg); + }else{ + return false; + } + } return (true); } |