Code

Added comments
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 4 Oct 2010 12:02:12 +0000 (12:02 +0000)
committerhickert <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

index ffcff6799b0d86800cbea41f85de032a03736b0e..9d1260bf2b58e8329ae26725c27baaeaa28cf44d 100644 (file)
@@ -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);
             }