[aur-dev] [PATCH 1/2] Display registration date on account details page
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- Apparently the RegistrationTS isn't actually a UNIX timestamp. It uses CURRENT_TIMESTAMP which is just an alias to NOW in MySQL, leading to a date in "Y-m-d H:M" format, so use DateTime to only print the date part. web/template/account_details.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/template/account_details.php b/web/template/account_details.php index 8b76382..b79685b 100644 --- a/web/template/account_details.php +++ b/web/template/account_details.php @@ -59,6 +59,10 @@ <?= $row["InactivityTS"] ? __("Inactive since") . ' ' . date("Y-m-d H:i", $row["InactivityTS"]) : __("Active"); ?> </td> </tr> + <tr> + <th><?= __("Registration date:") ?></th> + <td><?= (new DateTime($row["RegistrationTS"]))->format('Y-m-d') ?></td> + </tr> <?php if (has_credential(CRED_ACCOUNT_LAST_LOGIN)): ?> <tr> <th><?= __("Last Login") . ":" ?></th> -- 2.9.2
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- web/template/account_edit_form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index 6c2b8fb..19821a0 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -1,6 +1,7 @@ <?php if ($A == "UpdateAccount"): ?> <p> <?= __('Click %shere%s if you want to permanently delete this account.', '<a href="' . get_user_uri($N) . 'delete/' . '">', '</a>') ?> + <?= __('Click %shere%s for user details.', '<a href="' . get_user_uri($N) . '">', '</a>') ?> </p> <form id="edit-profile-form" action="<?= get_user_uri($N) . 'update/'; ?>" method="post"> -- 2.9.2
On Thu, 11 Aug 2016 at 20:52:53, Johannes Löthberg via aur-dev wrote:
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- Apparently the RegistrationTS isn't actually a UNIX timestamp. It uses CURRENT_TIMESTAMP which is just an alias to NOW in MySQL, leading to a date in "Y-m-d H:M" format, so use DateTime to only print the date part.
web/template/account_details.php | 4 ++++ 1 file changed, 4 insertions(+) [...]
Merged both patches to pu. Thanks!
participants (2)
-
Johannes Löthberg
-
Lukas Fleischer