diff --git a/phpgwapi/inc/phpgw_auth_ldap.inc.php b/phpgwapi/inc/phpgw_auth_ldap.inc.php index ff47582fcf..f5c71e5e9e 100644 --- a/phpgwapi/inc/phpgw_auth_ldap.inc.php +++ b/phpgwapi/inc/phpgw_auth_ldap.inc.php @@ -52,9 +52,10 @@ $encrypted_passwd = $phpgw->common->encrypt_password($new_passwd); $entry["userpassword"] = $encrypted_passwd; #$entry["phpgw_lastpasswd_change"] = time(); - $dn = $phpgw_info["user"]["account_dn"]; - @ldap_modify($ldap, $dn, $entry); + + if (!@ldap_modify($ldap, $dn, $entry)) return false; + return $encrypted_passwd; } }