Skip to content

Commit f2d8bd4

Browse files
DMaesterBalazs Dianiska
authored andcommitted
Issue #2420087 by DMaester: Fatal error in all PHP versions prior to 5.5
1 parent 68fa312 commit f2d8bd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simplesamlphp_auth.module

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ function simplesamlphp_auth_init() {
138138
$allowed_default_login_roles = variable_get('simplesamlphp_auth_allowdefaultloginroles', array());
139139

140140
// Check if user is allowed default login.
141+
$user_allowed_default_login_roles = array_intersect_key($user->roles, $allowed_default_login_roles);
141142
if (variable_get('simplesamlphp_auth_allowdefaultlogin', TRUE) &&
142-
(in_array($user->uid, $allowed_uids) || !empty(array_intersect_key($user->roles, $allowed_default_login_roles)))) {
143+
(in_array($user->uid, $allowed_uids) || !empty($user_allowed_default_login_roles))) {
143144
$user_allowed_default_login = TRUE;
144145
}
145146

0 commit comments

Comments
 (0)