fix: user profile page created at date not showing up

This commit is contained in:
Floorb 2023-02-27 05:33:13 -05:00
parent 758d1d5d1d
commit 49c5643bc7
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ $profile_username = trim($_GET['user']);
$profile_info = User::with('favourites') $profile_info = User::with('favourites')
->where('username', $profile_username) ->where('username', $profile_username)
->select('id', 'date', 'badge') ->select('id', 'created_at', 'badge')
->first(); ->first();
if (!$profile_info) { if (!$profile_info) {
@ -58,7 +58,7 @@ $profile_total_paste_views = Paste::select('views')
->where('user_id', $profile_info->id) ->where('user_id', $profile_info->id)
->sum('views'); ->sum('views');
$profile_join_date = $profile_info['date']; $profile_join_date = $profile_info->created_at;
$profile_pastes = $profile_info->pastes; $profile_pastes = $profile_info->pastes;
$profile_favs = $profile_info->favourites; $profile_favs = $profile_info->favourites;

View file

@ -38,7 +38,7 @@
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<h1 class="title is-5"><?= pp_html_escape($profile_username) ?>'s Pastes</h1> <h1 class="title is-5"><?= pp_html_escape($profile_username) ?>'s Pastes</h1>
<h1 class="subtitle is-6">joined: <?= $profile_join_date; ?></h1> <h1 class="subtitle is-6">joined: <?= $profile_join_date ?></h1>
<!-- Badges system --> <!-- Badges system -->
<div class="box"> <div class="box">
<h2 class="title is-5">Badges</h2> <h2 class="title is-5">Badges</h2>