Révision bc175c27
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/ldap/ldap_test/LdapTestFunctions.class.php | ||
---|---|---|
183 | 183 |
|
184 | 184 |
if ($clones) { |
185 | 185 |
$clonable_user = $this->csvTables['users'][101]; |
186 |
for ($i=0; $i < $clones; $i++) {
|
|
186 |
for ($i = 0; $i < $clones; $i++) {
|
|
187 | 187 |
$user = $clonable_user; |
188 | 188 |
$cn = "clone" . $i; |
189 | 189 |
$dn = 'cn=' . $cn . ',' . $this->csvTables['conf'][$test_ldap_id]['userbasedn']; |
... | ... | |
254 | 254 |
if ($server_properties['groupUserMembershipsAttrExists']) { |
255 | 255 |
$member_attr = $server_properties['groupUserMembershipsAttr']; |
256 | 256 |
foreach ($this->csvTables['memberships'] as $gid => $membership) { |
257 |
$group_dn = $this->data['ldap_servers_by_guid'][$sid][$membership['group_guid']]['dn'];
|
|
258 |
$user_dn = $this->data['ldap_servers_by_guid'][$sid][$membership['member_guid']]['dn'];
|
|
257 |
$group_dn = $this->data['ldap_servers_by_guid'][$sid][$membership['group_guid']]['dn']; |
|
258 |
$user_dn = $this->data['ldap_servers_by_guid'][$sid][$membership['member_guid']]['dn']; |
|
259 | 259 |
$this->ldapData['ldap_servers'][$sid][$user_dn][$member_attr][] = $group_dn; |
260 | 260 |
if (isset($this->ldapData['ldap_servers'][$sid][$user_dn][$member_attr]['count'])) { |
261 | 261 |
unset($this->ldapData['ldap_servers'][$sid][$user_dn][$member_attr]['count']); |
... | ... | |
265 | 265 |
} |
266 | 266 |
} |
267 | 267 |
|
268 |
$this->data['ldap_servers'][$sid]['ldap'] = $this->ldapData['ldap_servers'][$sid];
|
|
269 |
$this->data['ldap_servers'][$sid]['csv'] = $this->csvTables;
|
|
268 |
$this->data['ldap_servers'][$sid]['ldap'] = $this->ldapData['ldap_servers'][$sid]; |
|
269 |
$this->data['ldap_servers'][$sid]['csv'] = $this->csvTables; |
|
270 | 270 |
variable_set('ldap_test_server__' . $sid, $this->data['ldap_servers'][$sid]); |
271 | 271 |
$current_sids = variable_get('ldap_test_servers', array()); |
272 | 272 |
$current_sids[] = $sid; |
... | ... | |
338 | 338 |
public function addLDAPUserToLDAPArraysFromAttributes($user, $sid, $dn, $attributes, $ldap_type, $user_attr) { |
339 | 339 |
|
340 | 340 |
if ($ldap_type == 'activedirectory') { |
341 |
$attributes[$user_attr] = array(0 => $user['cn'], 'count' => 1);
|
|
342 |
$attributes['distinguishedname'] = array( 0 => $dn, 'count' => 1);
|
|
341 |
$attributes[$user_attr] = array(0 => $user['cn'], 'count' => 1); |
|
342 |
$attributes['distinguishedname'] = array( 0 => $dn, 'count' => 1); |
|
343 | 343 |
} |
344 | 344 |
elseif ($ldap_type == 'openldap') { |
345 | 345 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules