diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-02-22 14:42:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 14:42:02 +0300 |
commit | ce3534e428a91ab80f558905de46851b5ef013f0 (patch) | |
tree | a9bf51f11ce7d4a360da0865230da7a0ea2820db /lib | |
parent | 5a0be00eaac073318b11e2f80710c1cf6d791cbb (diff) | |
parent | 071b686543b5915b0be36a5be57cd29f524f155b (diff) |
Merge pull request #14337 from nextcloud/bugfix/noid/undefined-index-user-uid
Fix "Undefined index: user_uid" on login page
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/TemplateLayout.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 74578afe861..f23ec97119f 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -67,7 +67,7 @@ class TemplateLayout extends \OC_Template { } // Decide which page we show - if($renderAs == 'user') { + if($renderAs === 'user') { parent::__construct( 'core', 'layout.user' ); if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) { $this->assign('bodyid', 'body-settings'); @@ -115,10 +115,12 @@ class TemplateLayout extends \OC_Template { $this->assign('themingInvertMenu', false); } - } else if ($renderAs == 'error') { + } else if ($renderAs === 'error') { parent::__construct('core', 'layout.guest', '', false); $this->assign('bodyid', 'body-login'); - } else if ($renderAs == 'guest') { + $this->assign('user_displayname', ''); + $this->assign('user_uid', ''); + } else if ($renderAs === 'guest') { parent::__construct('core', 'layout.guest'); \OC_Util::addStyle('guest'); $this->assign('bodyid', 'body-login'); @@ -126,7 +128,7 @@ class TemplateLayout extends \OC_Template { $userDisplayName = \OC_User::getDisplayName(); $this->assign('user_displayname', $userDisplayName); $this->assign('user_uid', \OC_User::getUser()); - } else if ($renderAs == 'public') { + } else if ($renderAs === 'public') { parent::__construct('core', 'layout.public'); $this->assign( 'appid', $appId ); $this->assign('bodyid', 'body-public'); |