diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-04-15 19:51:00 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-04-15 19:53:14 +0200 |
commit | d4a93893bb9045262aa2803a727a33481248eb0d (patch) | |
tree | c513160c2d65cdec101faad3bddb19c260a63fab /core/Controller | |
parent | 17dfffefb368b167cfbad9b6c48e59e8bc952691 (diff) | |
download | nextcloud-server-d4a93893bb9045262aa2803a727a33481248eb0d.tar.gz nextcloud-server-d4a93893bb9045262aa2803a727a33481248eb0d.zip |
Also check for an empty string
PHP. Yay.
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/LoginController.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index ba9a1fee23a..faed7e291ea 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -74,7 +74,7 @@ class LoginController extends Controller { * * @return TemplateResponse */ - public function showLoginForm($user = '', + public function showLoginForm($user, $redirect_url, $remember_login) { if($this->userSession->isLoggedIn()) { @@ -94,7 +94,7 @@ class LoginController extends Controller { } $parameters['messages'] = $messages; - if ($user !== '') { + if (!is_null($user) && $user !== '') { $parameters['loginName'] = $user; $parameters['user_autofocus'] = false; } else { @@ -107,7 +107,7 @@ class LoginController extends Controller { $parameters['canResetPassword'] = true; if (!$this->config->getSystemValue('lost_password_link')) { - if ($user !== '') { + if (!is_null($user) && $user !== '') { $userObj = $this->userManager->get($user); if ($userObj instanceof IUser) { $parameters['canResetPassword'] = $userObj->canChangePassword(); @@ -119,7 +119,7 @@ class LoginController extends Controller { $parameters['rememberLoginAllowed'] = \OC_Util::rememberLoginAllowed(); $parameters['rememberLoginState'] = !empty($remember_login) ? $remember_login : 0; - if ($user !== '') { + if (!is_null($user) && $user !== '') { $parameters['loginName'] = $user; $parameters['user_autofocus'] = false; } else { |