diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-02-20 13:21:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 13:21:39 +0100 |
commit | 82625e2a45e4ad136071d064ed33232773084d11 (patch) | |
tree | 18c11e252c8e67bb477870d48f7ce64c9f77a328 /lib/private | |
parent | 7f49a2cb63d979932890dd9fb296e9b8f27405cd (diff) | |
parent | 08688af2751a966c3e3bdf811c6eb97247fe435e (diff) | |
download | nextcloud-server-82625e2a45e4ad136071d064ed33232773084d11.tar.gz nextcloud-server-82625e2a45e4ad136071d064ed33232773084d11.zip |
Merge pull request #14178 from nextcloud/bugfix/noid/get-current-user-for-guest-pages
Fix OC.getCurrentUser() on guest pages
Diffstat (limited to 'lib/private')
-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 ); |