function _ldapgroups_ldap_info in LDAP integration 6
Retrieve the saved ldapgroups saved setting.
Parameters
$sid: A server ID or user object.
$req: An attribute name.
Return value
The attribute value.
8 calls to _ldapgroups_ldap_info()
- ldapgroups_access_rules in ./
ldapgroups.inc - Retrieve the ldapgroups access rules for the specified server.
- ldapgroups_groups_load in ./
ldapgroups.inc - Create an array of LDAP groups related to a dn/user.
- ldapgroups_is_configured in ./
ldapgroups.inc - ldapgroups_ldap_user_deny_alter in ./
ldapgroups.module - Implementation of hook_ldap_user_deny_alter.
- ldapgroups_user_login in ./
ldapgroups.inc - Implements hook_user() login operation.
File
- ./
ldapgroups.inc, line 333 - ldapgroups include file.
Code
function _ldapgroups_ldap_info($sid, $req) {
if (!($sid = is_object($sid) ? isset($sid->ldap_config) ? $sid->ldap_config : NULL : $sid)) {
return;
}
$server = ldapauth_server_load($sid);
switch ($req) {
case 'ldapgroups_in_dn':
return $server->ldapgroups_in_dn;
case 'ldapgroups_dn_attribute':
return !empty($server->ldapgroups_dn_attribute) ? $server->ldapgroups_dn_attribute : LDAPGROUPS_DEFAULT_DN_ATTRIBUTE;
case 'ldapgroups_in_attr':
return $server->ldapgroups_in_attr;
case 'ldapgroups_attr':
return !empty($server->ldapgroups_attr) ? unserialize($server->ldapgroups_attr) : array();
case 'ldapgroups_as_entries':
return $server->ldapgroups_as_entries;
case 'ldapgroups_entries':
return !empty($server->ldapgroups_entries) ? unserialize($server->ldapgroups_entries) : array();
case 'ldapgroups_entries_attribute':
return !empty($server->ldapgroups_entries_attribute) ? $server->ldapgroups_entries_attribute : LDAPGROUPS_DEFAULT_ENTRIES_ATTRIBUTE;
case 'ldapgroups_mappings':
return !empty($server->ldapgroups_mappings) ? unserialize($server->ldapgroups_mappings) : array();
case 'ldapgroups_mappings_filter':
return $server->ldapgroups_mappings_filter;
case 'ldapgroups_filter_php':
return $server->ldapgroups_filter_php;
case 'ldapgroups_groups':
return !empty($server->ldapgroups_groups) ? unserialize($server->ldapgroups_groups) : array();
}
}