From: hickert Date: Mon, 4 Oct 2010 12:02:12 +0000 (+0000) Subject: Added comments X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f8ee3f1d71216cd3003b5b87fdeb507c275453bd;p=gosa.git Added comments git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19910 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/password-methods/class_password-methods.inc b/gosa-core/include/password-methods/class_password-methods.inc index ffcff6799..9d1260bf2 100644 --- a/gosa-core/include/password-methods/class_password-methods.inc +++ b/gosa-core/include/password-methods/class_password-methods.inc @@ -110,8 +110,11 @@ class passwordMethod $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, @@ -119,8 +122,9 @@ class passwordMethod "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()); @@ -167,9 +171,11 @@ class passwordMethod $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( @@ -177,6 +183,8 @@ class passwordMethod "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); }