summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f6d6d25)
raw | patch | inline | side by side (parent: f6d6d25)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 12:40:29 +0000 (12:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 12:40:29 +0000 (12:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19911 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/password-methods/class_password-methods.inc | patch | blob | history |
diff --git a/gosa-core/include/password-methods/class_password-methods.inc b/gosa-core/include/password-methods/class_password-methods.inc
index 51fdad0c8149c5a7de13074428c946bb8a136507..9f08e239509a1b202bb593ceb0b01c5fc0c1d31c 100644 (file)
if(preg_match("/^[^\}]*+\}!/",$pwd)){
return(TRUE);
}
-
+
+ // Lock the account by modifying the password hash.
+ $pwdClass = new password($config, $dn);
+ $pwdClass->callHook($pwdClass, 'PRELOCK',array(), $ret);
+
/* Lock entry */
$pwd = preg_replace("/(^[^\}]+\})(.*$)/","\\1!\\2",$pwd);
$ldap->cd($dn);
$ldap->modify(array("userPassword" => $pwd));
+
+ // Call the password post-lock hook, if defined.
+ if($ldap->success()){
+ $pwdClass->callHook($pwdClass, 'POSTLOCK',array(), $ret);
+ }
+
return($ldap->success());
}
return(FALSE);
return (TRUE);
}
+ // Unlock the account by modifying the password hash.
+ $pwdClass = new password($config, $dn);
+ $pwdClass->callHook($pwdClass, 'PREUNLOCK',array(), $ret);
+
/* Lock entry */
$pwd = preg_replace("/(^[^\}]+\})!(.*$)/","\\1\\2",$pwd);
$ldap->cd($dn);
$ldap->modify(array("userPassword" => $pwd));
+
+ // Call the password post-lock hook, if defined.
+ if($ldap->success()){
+ $pwdClass->callHook($pwdClass, 'POSTUNLOCK',array(), $ret);
+ }
return($ldap->success());
}
return(FALSE);