summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-04-05 18:28:52 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-04-05 19:28:06 +0200
commitddc739b5ac2bb5f54fdb47db6a3e0dfe83d1c473 (patch)
treef54f75fe1b0d1f58c503e907e1f083889d951e6a /core/templates
parent9c84aa5870204a871024ca18b4994ed40defdd9b (diff)
downloadnextcloud-server-ddc739b5ac2bb5f54fdb47db6a3e0dfe83d1c473.tar.gz
nextcloud-server-ddc739b5ac2bb5f54fdb47db6a3e0dfe83d1c473.zip
Retrieve user status only once when displaying page
We don't need to inject it in the template if the data is already available in the initial state. This is also a bit cleaner. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.user.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index ce316b882e6..2b84c89fca6 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -153,11 +153,7 @@ $getUserAvatar = static function (int $size) use ($_): string {
} ?>"
data-user="<?php p($_['user_uid']); ?>"
data-displayname="<?php p($_['user_displayname']); ?>"
- <?php if ($_['userStatus'] !== false) { ?>
- data-userstatus="<?php p($_['userStatus']->getStatus()); ?>"
- data-userstatus_message="<?php p($_['userStatus']->getMessage()); ?>"
- data-userstatus_icon="<?php p($_['userStatus']->getIcon()); ?>"
- <?php }
+ <?php
if ($_['userAvatarSet']) {
$avatar32 = $getUserAvatar(32); ?> data-avatar="<?php p($avatar32); ?>"
<?php