From 93817fef3ead7cfd4fcde25ea2bcec02d01310a4 Mon Sep 17 00:00:00 2001
From: Jonas Kohl
Date: Fri, 13 Sep 2024 19:57:43 +0200
Subject: A lot of changes again
---
src/application/views/view_user.php | 154 +++++++++++++++++++++++++++++++++++-
1 file changed, 153 insertions(+), 1 deletion(-)
(limited to 'src/application/views/view_user.php')
diff --git a/src/application/views/view_user.php b/src/application/views/view_user.php
index 334928b..23d2b71 100644
--- a/src/application/views/view_user.php
+++ b/src/application/views/view_user.php
@@ -1 +1,153 @@
-
= htmlentities($user->displayName) ?>
+id === $GLOBALS["currentUser"]?->id && $user->hasPermission(UserPermissions::EDIT_OWN_USER))
+ || $GLOBALS["currentUser"]?->hasPermission(UserPermissions::EDIT_OTHER_USER);
+
+$isOwnProfile = $user->id === $GLOBALS["currentUser"]?->id;
+
+$sIsOwn_your = "";
+if ($isOwnProfile)
+ $sIsOwn_your = " your";
+
+$sUserPossessive = "";
+if ($isOwnProfile)
+ $sUserPossessive = "Your";
+else
+ $sUserPossessive = $user->displayName . "'s";
+
+$dateJoined = DateTime::createFromImmutable($user->created);
+$dateJoined->setTime(0, 0, 0, 0);
+?>
+
+
+
+
= htmlentities($user->displayName) ?>
+
+
You
+
+ @= htmlentities($user->name) ?> •
Member since = htmlentities($dateJoined->format("c")); ?>
+
+
+
+
+
+
+
+
= $sUserPossessive ?> posts
+
+ 0): ?>
+
+
+
+
+ This user has not posted anything yet
+
+
+
+
+
+
+
+
Edit= $sIsOwn_your ?> profile
+ $_formError]);
+}
+?>
+
+
+
+
+
+
+
--
cgit v1.2.3