[aur-dev] [PATCH] Do not show current day if registration date is unknown
Lukas Fleischer
lfleischer at archlinux.org
Mon Oct 17 15:11:59 UTC 2016
The registration date field on the account details page currently
defaults to the current day if the user's registration date is unknown.
To avoid confusion, show "unknown" in these cases instead.
Fixes FS#51405.
Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
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 b79685b..024bd9c 100644
--- a/web/template/account_details.php
+++ b/web/template/account_details.php
@@ -61,7 +61,11 @@
</tr>
<tr>
<th><?= __("Registration date:") ?></th>
+ <?php if ($row["RegistrationTS"]): ?>
<td><?= (new DateTime($row["RegistrationTS"]))->format('Y-m-d') ?></td>
+ <?php else: ?>
+ <td><?= __("unknown") ?></td>
+ <?php endif; ?>
</tr>
<?php if (has_credential(CRED_ACCOUNT_LAST_LOGIN)): ?>
<tr>
--
2.10.0
More information about the aur-dev
mailing list