From a3d8da0a73f5c1c3ec2248b1bac9dc9a17e51c43 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 24 May 2017 11:27:27 +0200 Subject: [PATCH] Fix: wrong SPECIMEN value --- htdocs/user/class/usergroup.class.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 81c5e986444..319b48dfffa 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/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 + ); } }