function hook_simplesamlphp_auth_allow_login in simpleSAMLphp Authentication 7.3
Same name and namespace in other branches
- 8.3 simplesamlphp_auth.api.php \hook_simplesamlphp_auth_allow_login()
Allows other modules to decide whether user with the given set of attributes is allowed to log in via SSO or not.
Each implementation should take care of displaying errors, there is no message implementation at hook invocation. Implementations should return a boolean indicating the success of the access check. Access will be denied if any implementations return FALSE.
Parameters
$attributes:
Return value
bool
1 invocation of hook_simplesamlphp_auth_allow_login()
- _simplesamlphp_auth_allow_user_by_attribute in ./
simplesamlphp_auth.inc - Asks all modules if current federated user is allowed to login. Returns FALSE if at least one module returns FALSE
File
- ./
simplesamlphp_auth.api.php, line 45 - Hooks for simpleSAMLphp Authentication module.
Code
function hook_simplesamlphp_auth_allow_login($attributes) {
if (in_array('student', $attributes)) {
return FALSE;
}
else {
return TRUE;
}
}