Commit 3353fca4 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3383 Fixed locking users

parent 1a14a48d
......@@ -133,7 +133,7 @@ class passwordMethod
}
/*!
* \brief Unlocks an account (gosaAccount) which was locked by 'lock_account()'.
* \brief (Un)locks an account (gosaAccount) which was locked by 'lock_account()'.
* For details about the locking mechanism see 'lock_account()'.
*/
private function generic_modify_account($config, $dn, $mode)
......@@ -175,9 +175,6 @@ class passwordMethod
$modify = lock_samba_account($mode, $attrs);
// (Un)lock the account by modifying the password hash.
$pwdClass = new password($config, $dn);
$pwdClass->callHook($pwdClass, 'PRE'.$mode, array(), $ret);
if ($mode == 'LOCK') {
/* Lock entry */
$pwd = preg_replace("/(^[^\}]+\})(.*$)/", "\\1!\\2", $pwd);
......@@ -189,10 +186,6 @@ class passwordMethod
$ldap->cd($dn);
$ldap->modify($modify);
// Call the password post-lock hook, if defined.
if ($ldap->success()) {
$pwdClass->callHook($pwdClass, 'POST'.$mode, array(), $ret);
}
return $ldap->success();
}
return FALSE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment