Test if $casSettings['user_whitelist'] is an array - and then perform in_array(...) instead of just checking if it's != null.
This commit is contained in:
parent
6ca5bb4d41
commit
1e1543dd72
@ -41,7 +41,7 @@ class CasloginAction extends Action
|
|||||||
$this->serverError(_m('Incorrect username or password.'));
|
$this->serverError(_m('Incorrect username or password.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($casSettings['user_whitelist'] != null && !in_array($user->nickname, $casSettings['user_whitelist'])) {
|
if (is_array($casSettings['user_whitelist']) && !in_array($user->nickname, $casSettings['user_whitelist'])) {
|
||||||
// TRANS: Server error displayed when trying to log in with non-whitelisted user name (when whitelists are enabled.)
|
// TRANS: Server error displayed when trying to log in with non-whitelisted user name (when whitelists are enabled.)
|
||||||
$this->serverError(_m('Incorrect username or password.'));
|
$this->serverError(_m('Incorrect username or password.'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user