diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index ffa5b10fc2ff7cd2734a4c17e1746ca8c1964d82..2235439d9568d5941e114a70449d6b98a2d2b9b3 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -141,7 +141,8 @@ class LoginController extends Controller { * * @return TemplateResponse|RedirectResponse */ - public function showLoginForm($user, $redirect_url) { + public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response { + if ($this->userSession->isLoggedIn()) { return new RedirectResponse(OC_Util::getDefaultPageUrl()); }