diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-13 14:50:06 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-02-19 16:08:40 +0100 |
commit | 08688af2751a966c3e3bdf811c6eb97247fe435e (patch) | |
tree | 885c70744d8d5685cc8c45daef69de1dd178b98b /lib/private/TemplateLayout.php | |
parent | e7f0e8ba03363f37631ded3099d4e2bf0df5d5f6 (diff) | |
download | nextcloud-server-08688af2751a966c3e3bdf811c6eb97247fe435e.tar.gz nextcloud-server-08688af2751a966c3e3bdf811c6eb97247fe435e.zip |
Fix OC.getCurrentUser() on guest pages
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index e4a2724de67..74578afe861 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -122,6 +122,10 @@ class TemplateLayout extends \OC_Template { parent::__construct('core', 'layout.guest'); \OC_Util::addStyle('guest'); $this->assign('bodyid', 'body-login'); + + $userDisplayName = \OC_User::getDisplayName(); + $this->assign('user_displayname', $userDisplayName); + $this->assign('user_uid', \OC_User::getUser()); } else if ($renderAs == 'public') { parent::__construct('core', 'layout.public'); $this->assign( 'appid', $appId ); |