Code

Added patches
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Feb 2010 08:15:19 +0000 (08:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Feb 2010 08:15:19 +0000 (08:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@15702 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/generic/class_user.inc

index b3ac780bf1c89ceefd4c147834b97404db938154..94a9ae722ae40bbd336f46bfb1b5ca29359ac061 100644 (file)
@@ -1389,10 +1389,15 @@ class user extends plugin
   /* Indicate whether a password change is needed or not */
   function password_change_needed()
   {
-    if(in_array("pw_storage",$this->multi_boxes)){
-      return(TRUE);
+    if($this->multiple_support_active){
+      return(FALSE);
+    }else{
+
+      if(in_array("pw_storage",$this->multi_boxes)){
+        return(TRUE);
+      }
+      return($this->pw_storage != $this->last_pw_storage && !$this->is_template);
     }
-    return($this->pw_storage != $this->last_pw_storage && !$this->is_template);
   }
 
 
@@ -1744,6 +1749,9 @@ class user extends plugin
 
   function multiple_save_object()
   {
+
+    if(!isset($_POST['user_mulitple_edit'])) return;
+
     plugin::multiple_save_object();
 
     /* Get pw_storage mode */
@@ -1842,6 +1850,19 @@ class user extends plugin
       }
     }
 
+    // Detect the managers name
+    $this->manager_name = "";
+    $ldap = $this->config->get_ldap_link();
+    if(!empty($this->manager)){
+      $ldap->cat($this->manager, array('cn'));
+      if($ldap->count()){
+        $attrs = $ldap->fetch();
+        $this->manager_name = $attrs['cn'][0];
+      }else{
+        $this->manager_name = "("._("Unknown")."!): ".$this->manager;
+      }
+    }
+
     // Detect login restriction not used in all user objects.
     $this->gosaLoginRestriction_some = array();
     if(isset($all['gosaLoginRestriction'])){