summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/templates/layout.guest.php6
-rw-r--r--lib/private/TemplateLayout.php4
2 files changed, 9 insertions, 1 deletions
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index ae685959351..1df2eade09b 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -1,6 +1,10 @@
<!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
- <head data-requesttoken="<?php p($_['requesttoken']); ?>">
+ <head
+<?php if ($_['user_uid']) { ?>
+ data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>"
+<?php } ?>
+ data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
<?php p($theme->getTitle()); ?>
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 );