Code

Do not write sambaHashes while there is now sambaHashHook defined.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jul 2010 14:25:19 +0000 (14:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jul 2010 14:25:19 +0000 (14:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19042 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc

index 531f7942be3a787e90cb1dda20457f85d0a5b96f..4434c514ceedc829842731ee2ed91a94f3fb2bda 100644 (file)
@@ -3022,12 +3022,16 @@ function change_password ($dn, $password, $mode=0, $hash= "")
 
     // Not for groups
     if ($mode == 0){
-      // Create SMB Password
-      $attrs= generate_smb_nt_hash($password);
 
-      if ($shadow != 0){
-        $attrs['shadowLastChange']= $shadow;
-      }
+        // Create SMB Password
+        if ($config->get_cfg_value('sambaHashHook', NULL)) { 
+            echo "111111";
+            $attrs= generate_smb_nt_hash($password);
+
+            if ($shadow != 0){
+                $attrs['shadowLastChange']= $shadow;
+            }
+        }
     }
 
     $attrs['userPassword']= array();