Changeset 46 for trunk/expressoAdmin1_2/inc/class.group.inc.php
- Timestamp:
- 08/06/07 08:54:16 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.group.inc.php
r33 r46 75 75 $group_info['userPassword'] = ''; 76 76 77 // E-mail for groups 78 if ($params['email'] != '') 79 $group_info['mail'] = $params['email']; 80 77 81 if (count($params['members'])) 78 82 { … … 93 97 { 94 98 $group_info['objectClass'][] = 'sambaGroupMapping'; 95 $group_info['sambaSID'] = $params['samba domain'] . '-' . (($id * 2) + 1001);99 $group_info['sambaSID'] = $params['sambasid'] . '-' . (($id * 2) + 1001); 96 100 $group_info['sambaGroupType'] = '2'; 97 101 } … … 166 170 } 167 171 172 $ldap_mod_replace = array(); 168 173 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 169 174 // REPLACE SAMBASID OF SAMBA 170 if ( ($this->current_config['expressoAdmin_samba_support'] == 'true') && ($diff['samba domain']) )171 { 172 $ldap_mod_replace['samba SID'] = $new_values['sambadomain'] . '-' . ((2 * $new_values['uidnumber'])+1001);173 $this->db_functions->write_log("Alterado dominio samba do grupo $dn para " . $new_values['samba domain'],'',$dn,'','');175 if ( ($this->current_config['expressoAdmin_samba_support'] == 'true') && ($diff['sambasid']) && ($old_values['sambasid'])) 176 { 177 $ldap_mod_replace['sambasid'] = $new_values['sambasid'] . '-' . ((2 * $new_values['gidnumber'])+1001); 178 $this->db_functions->write_log("Alterado dominio samba do grupo $dn para " . $new_values['sambasid'],'',$dn,'',''); 174 179 } 175 180 … … 183 188 184 189 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 185 // CALL LDAP_REPLACE FUNCTION 190 // REPLACE E-Mail 191 if ((($old_values['email']) && ($diff['email'])) && 192 $this->functions->check_acl($_SESSION['phpgw_session']['session_lid'],'edit_email_groups')) 193 { 194 $ldap_mod_replace['mail'] = $new_values['email']; 195 $this->db_functions->write_log("Modificado E-Mail do grupo $dn",'',$dn,'',''); 196 } 197 198 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 199 // CALL LDAP_REPLACE FUNCTION 186 200 if (count($ldap_mod_replace)) 187 201 { … … 226 240 $ldap_add['objectClass'][] = 'sambaGroupMapping'; 227 241 $ldap_add['sambagrouptype'] = '2'; 228 $ldap_add['sambasid'] = $new_values['samba domain'] . '-' . ((2 * $new_values['gidnumber'])+1001);242 $ldap_add['sambasid'] = $new_values['sambasid'] . '-' . ((2 * $new_values['gidnumber'])+1001); 229 243 230 244 $result = $this->ldap_functions->add_user_attributes($dn, $ldap_add); … … 241 255 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 242 256 // ADD ATTRIBUTES 257 $ldap_add = array(); 243 258 if (($new_values['phpgwaccountvisible'] == 'on') && ($old_values['phpgwaccountvisible'] != '-1')) 244 259 { 245 260 $ldap_add['phpgwaccountvisible'] = '-1'; 261 $this->db_functions->write_log("Adicionado atributo phpgwaccountvisible ao grupo $dn",'','','',''); 262 } 263 if ((($new_values['email']) && (!$old_values['email'])) && 264 $this->functions->check_acl($_SESSION['phpgw_session']['session_lid'],'edit_email_groups')) 265 { 266 $ldap_add['mail'] = $new_values['email']; 267 $this->db_functions->write_log("Adicionado atributo mail ao grupo $dn",'','','',''); 268 } 269 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 270 // CALL LDAP_ADD FUNCTION 271 if (count($ldap_add)) 272 { 246 273 $result = $this->ldap_functions->add_user_attributes($dn, $ldap_add); 247 274 if (!$result['status']) … … 250 277 $return['msg'] .= $result['msg']; 251 278 } 252 else 253 $this->db_functions->write_log("Adicionado atributo phpgwaccountvisible ao grupo $dn",'','','',''); 254 } 255 279 } 280 281 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 256 282 // REMOVE ATTRIBUTES 283 $ldap_remove = array(); 257 284 if (($new_values['phpgwaccountvisible'] != 'on') && ($old_values['phpgwaccountvisible'] == '-1')) 258 285 { 259 286 $ldap_remove['phpgwaccountvisible'] = array(); 287 $this->db_functions->write_log("Removido atributo phpgwaccountvisible do grupo $dn",'','','',''); 288 } 289 if (((!$new_values['email']) && ($old_values['email'])) && 290 $this->functions->check_acl($_SESSION['phpgw_session']['session_lid'],'edit_email_groups')) 291 { 292 $ldap_remove['mail'] = array(); 293 $this->db_functions->write_log("Removido atributo mail do grupo $dn",'','','',''); 294 } 295 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 296 // CALL LDAP_REMOVED FUNCTION 297 if (count($ldap_remove)) 298 { 260 299 $result = $this->ldap_functions->remove_user_attributes($dn, $ldap_remove); 261 300 if (!$result['status']) … … 264 303 $return['msg'] .= $result['msg']; 265 304 } 266 else267 $this->db_functions->write_log("Removido atributo phpgwaccountvisible do grupo $dn",'','','','');268 305 } 269 306
Note: See TracChangeset
for help on using the changeset viewer.