function shib_auth_check_identifier in Shibboleth Authentication 6.4
Same name and namespace in other branches
- 7.4 shib_auth.module \shib_auth_check_identifier()
Check user identifier
Return value
FALSE if the identifier is not valid
1 call to shib_auth_check_identifier()
- shib_auth_init in ./
shib_auth.module - Create a new user based on informations from the Shibboleth handler if it's necessary or log in.
File
- ./
shib_auth.module, line 386 - Drupal Shibboleth authentication module.
Code
function shib_auth_check_identifier($uname) {
if (!$uname) {
$message = 'Username is missing. Please contact your site administrator!';
shib_auth_error(t('@msg', array(
'@msg' => $message,
)));
watchdog('shib_auth', '@msg', array(
'@msg' => $message,
), WATCHDOG_CRITICAL);
return FALSE;
}
elseif (drupal_strlen($uname) > 255) {
$message = 'User identifier is too long to process. Please contact your site administrator!';
shib_auth_error(t('@msg', array(
'@msg' => $message,
)));
watchdog('shib_auth', '@msg', array(
'@msg' => $message,
), WATCHDOG_CRITICAL);
return FALSE;
}
return TRUE;
}