diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-22 10:33:32 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-02-22 10:33:32 +0300 |
commit | 071b686543b5915b0be36a5be57cd29f524f155b (patch) | |
tree | 9ec3cf41e21c08d52b9dc3d7a23d05281317342c /lib | |
parent | 7c68e0eae7d378d73aa05361efbba835890c45c2 (diff) |
Fix "Undefined index: user_uid" on login page
Signed-off-by: Joas Schilling <coding@schilljs.com>
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'); |