summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-04-15 18:57:11 +0200
committerLukas Reschke <lukas@owncloud.com>2016-04-15 18:57:11 +0200
commit8a650a51be8e3c5c335e0aea9ff6b849e6ccc02f (patch)
treea74ee5f7f68994aa1340405c268f8ec3734f26e0 /core/Controller
parent331e4efacb226f95551962f3a53030feced0b190 (diff)
downloadnextcloud-server-8a650a51be8e3c5c335e0aea9ff6b849e6ccc02f.tar.gz
nextcloud-server-8a650a51be8e3c5c335e0aea9ff6b849e6ccc02f.zip
Use !== instead of empty
Users can be named null
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/LoginController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 661fb043851..ef6e1974842 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 (!empty($user)) {
+ if ($user !== '') {
$parameters['username'] = $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 (!empty($user)) {
+ if ($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 (!empty($user)) {
+ if ($user !== '') {
$parameters['username'] = $user;
$parameters['user_autofocus'] = false;
} else {