public function LdapTestFunctions::addLDAPUserToLDAPArraysFromAttributes in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::addLDAPUserToLDAPArraysFromAttributes()
1 call to LdapTestFunctions::addLDAPUserToLDAPArraysFromAttributes()
- LdapTestFunctions::populateFakeLdapServerData in ldap_test/
LdapTestFunctions.class.php - Set variable with fake test data.
File
- ldap_test/
LdapTestFunctions.class.php, line 386
Class
Code
public function addLDAPUserToLDAPArraysFromAttributes($user, $sid, $dn, $attributes, $ldap_type, $user_attr) {
if ($ldap_type == 'activedirectory') {
$attributes[$user_attr] = [
0 => $user['cn'],
'count' => 1,
];
$attributes['distinguishedname'] = [
0 => $dn,
'count' => 1,
];
}
elseif ($ldap_type == 'openldap') {
}
$this->data['ldap_servers'][$sid]['users'][$dn]['attr'] = $attributes;
$this->data['ldap_servers_by_guid'][$sid][$user['guid']]['attr'] = $attributes;
$this->data['ldap_servers_by_guid'][$sid][$user['guid']]['dn'] = $dn;
$this->ldapData['ldap_servers'][$sid][$dn] = $attributes;
$this->ldapData['ldap_servers'][$sid][$dn]['count'] = count($attributes);
}