Commit 1e1543dd authored by mmn's avatar mmn

Test if $casSettings['user_whitelist'] is an array - and then perform...

Test if $casSettings['user_whitelist'] is an array - and then perform in_array(...) instead of just checking if it's != null.
parent 6ca5bb4d
......@@ -41,7 +41,7 @@ class CasloginAction extends Action
$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.)
$this->serverError(_m('Incorrect username or password.'));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment