summaryrefslogtreecommitdiff
path: root/src/application/actions/viewuser
diff options
context:
space:
mode:
authorJonas Kohl2024-10-17 10:56:01 +0200
committerJonas Kohl2024-10-17 10:56:01 +0200
commitfe0f414dc0211a4014581dc03fcfd514ed7ed02d (patch)
treecd86fc00cd9b7a97eabb9668e0a39e2b4b3e5357 /src/application/actions/viewuser
parente0e89b9fdbf301e0ead944636023947a67aca57d (diff)
Transition templating to Twig
Diffstat (limited to 'src/application/actions/viewuser')
-rw-r--r--src/application/actions/viewuser/get.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/application/actions/viewuser/get.php b/src/application/actions/viewuser/get.php
index c98df16..e6dac43 100644
--- a/src/application/actions/viewuser/get.php
+++ b/src/application/actions/viewuser/get.php
@@ -17,18 +17,15 @@ foreach ($posts as $item) {
$attachs = $db->fetchCustom(Attachment::class, 'WHERE post_id = $1', [ $item->id ]);
$attachments[$item->id] = $attachs;
}
-_view("template_start", ["_title" => $user->displayName]);
-_view("template_navigation_start");
-_view("template_navigation", [
- "user" => $currentUser,
- "isViewingOwnProfile" => $isOwnProfile,
-]);
-_view("template_navigation_end");
-_view("view_user", [
+
+$dateJoined = DateTime::createFromImmutable($user->created);
+$dateJoined->setTime(0, 0, 0, 0);
+
+render("view_user.twig", [
"user" => $user,
"posts" => $posts,
"topics" => $topics,
"attachments" => $attachments,
"lastNameChangeTooRecent" => $lastNameChangeTooRecent,
+ "dateJoined" => $dateJoined,
]);
-_view("template_end", [...getThemeAndLangInfo()]);