瀏覽代碼

Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0

Laurent Destailleur 8 年之前
父節點
當前提交
4a330af4bf
共有 1 個文件被更改,包括 11 次插入7 次删除
  1. 11 7
      htdocs/user/class/usergroup.class.php

+ 11 - 7
htdocs/user/class/usergroup.class.php

@@ -335,16 +335,16 @@ class UserGroup extends CommonObject
 				$error++;
 				dol_print_error($this->db);
 			}
-			
+
 			if (! $error)
 			{
 			    $this->context = array('audit'=>$langs->trans("PermissionsAdd"));
-			
+
 			    // Call trigger
 			    $result=$this->call_trigger('GROUP_MODIFY',$user);
 			    if ($result < 0) { $error++; }
 			    // End call triggers
-			}			
+			}
 		}
 
 		if ($error) {
@@ -444,11 +444,11 @@ class UserGroup extends CommonObject
 				$error++;
 				dol_print_error($this->db);
 			}
-			
+
 			if (! $error)
 			{
 		        $this->context = array('audit'=>$langs->trans("PermissionsDelete"));
-		        
+
 			    // Call trigger
 			    $result=$this->call_trigger('GROUP_MODIFY',$user);
 			    if ($result < 0) { $error++; }
@@ -805,7 +805,7 @@ class UserGroup extends CommonObject
 				$muser=new User($this->db);
 				$muser->fetch($val->id);
 				$info2 = $muser->_load_ldap_info();
-                                $valueofldapfield[] = $muser->_load_ldap_dn($info2);
+				$valueofldapfield[] = $muser->_load_ldap_dn($info2);
 			}
 			$info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield)?$valueofldapfield:'');
 		}
@@ -833,7 +833,11 @@ class UserGroup extends CommonObject
 		$this->note='This is a note';
 		$this->datec=time();
 		$this->datem=time();
-		$this->members=array($user->id);	// Members of this group is just me
+
+		// Members of this group is just me
+		$this->members=array(
+				$user->id => $user
+		);
 	}
 }