diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-02-20 15:31:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 15:31:37 +0100 |
commit | 52662fb9289e0c6de0044bc98ab7e34055840cf5 (patch) | |
tree | f5e34b152f12202bc736b45f3f603c7f22869d36 /lib | |
parent | bb26c2628d773428ff4315db401bdd63c8d3c1b4 (diff) | |
parent | 2f98c873fab666b0297e540b5c816a72fe945855 (diff) | |
download | nextcloud-server-52662fb9289e0c6de0044bc98ab7e34055840cf5.tar.gz nextcloud-server-52662fb9289e0c6de0044bc98ab7e34055840cf5.zip |
Merge pull request #14308 from nextcloud/backport/14178/stable15
[stable15] Fix OC.getCurrentUser() on guest pages
Diffstat (limited to 'lib')
-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 284f14c5db4..60fc82efbc6 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 ); |