summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a94aed2)
raw | patch | inline | side by side (parent: a94aed2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 12:02:12 +0000 (12:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 12:02:12 +0000 (12:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19910 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 ffcff6799b0d86800cbea41f85de032a03736b0e..9d1260bf2b58e8329ae26725c27baaeaa28cf44d 100644 (file)
$sambaNTPassword = preg_replace("/^[!]*(.*$)/","!\\1",$sambaNTPassword);
$ldap->cd($dn);
+ // Lock the account by modifying the password hash.
$pwdClass = new password($config, $dn);
$pwdClass->callHook($pwdClass, 'PRELOCK',array(), $ret);
+
+ // Update the ldap entry
$ldap->modify(
array(
"userPassword" => $userPassword,
"sambaNTPassword" => $sambaNTPassword));
if($ldap->success()){
+
+ // Call the password post-lock hook, if defined.
$pwdClass->callHook($pwdClass, 'POSTLOCK',array(), $ret);
- print_a($ret);
}
return($ldap->success());
$sambaLMPassword = preg_replace("/^[!]*(.*$)/","\\1",$sambaLMPassword);
$sambaNTPassword = preg_replace("/^[!]*(.*$)/","\\1",$sambaNTPassword);
+ // Call a pre-lock hook if defined.
$pwdClass = new password($config, $dn);
$pwdClass->callHook($pwdClass, 'PREUNLOCK',array(), $ret);
+ // Lock the account by modifying the password hash.
$ldap->cd($dn);
$ldap->modify(
array(
"sambaLMPassword" => $sambaLMPassword,
"sambaNTPassword" => $sambaNTPassword));
if($ldap->success()){
+
+ // Call the password post-lock hook, if defined.
$pwdClass = new password($config, $dn);
$pwdClass->callHook($pwdClass, 'POSTUNLOCK',array(), $ret);
}