diff options
-rw-r--r-- | core/Controller/LoginController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index ffa5b10fc2f..0f02be4bfda 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -142,6 +142,10 @@ class LoginController extends Controller { * @return TemplateResponse|RedirectResponse */ public function showLoginForm($user, $redirect_url) { + if (!is_string($user)) { + throw new \InvalidArgumentException('User needs to be string'); + } + if ($this->userSession->isLoggedIn()) { return new RedirectResponse(OC_Util::getDefaultPageUrl()); } |