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 @@ -

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); +?> + +
+ + displayName) ?> + + You +
+ @name) ?> • Member since format("c")); ?> +
+ + +
+
+ + +

posts

+ + 0): ?> +
+
+ +
+
+ +
+
+ +
+ + This user has not posted anything yet +
+ + + +
+ +
+

Edit profile

+ $_formError]); +} +?> +
" method="post" enctype="multipart/form-data"> +
+ + +
+
+ + + + You can only change your username every 30 days! + + + +
+
+ + +
+
+ +profilePicture); +$_checkbox_disabled_class = $_checkbox_disabled ? " disabled" : ""; +?> +
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+
+ +
+ + + -- cgit v1.2.3