function _get_ldap_config_name in CAS 6
Same name and namespace in other branches
- 5.4 cas.module \_get_ldap_config_name()
- 5 cas.module \_get_ldap_config_name()
- 5.3 cas.module \_get_ldap_config_name()
- 6.2 cas.module \_get_ldap_config_name()
LDAP Auxiliary functions
2 calls to _get_ldap_config_name()
- cas_form_alter in ./
cas.module - implementation of hook_form_alter Overrides specific from settings based on user policy.
- cas_login_check in ./
cas.module - Checks to see if the user needs to be logged in
File
- ./
cas.module, line 755
Code
function _get_ldap_config_name($user_name) {
include_once 'modules/ldap_integration/ldapauth.module';
$user_found = false;
$result = db_query("SELECT name FROM {ldapauth} WHERE status = '%d' ORDER BY sid", 1);
while ($row = db_fetch_object($result)) {
// cycle thru the authentication schemes - first successful one wins
// instantiate ldap
_ldapauth_init($row->name);
$ldap_user_entry = _ldapauth_user_lookup($user_name);
if ($ldap_user_entry) {
$user_found = true;
break;
}
}
if ($user_found) {
return $row->name;
}
else {
return false;
}
}