summaryrefslogtreecommitdiffstats
path: root/web/template/account_details.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-10-17 14:45:27 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-10-17 14:58:37 +0200
commit1e9735972a3cc210e282695faeed88febc0be99f (patch)
tree7e909d93cf865424a6e7976f5b11a80268f7eee5 /web/template/account_details.php
parentfb07307638a17b7e150c54405d2b6fb6a1e98508 (diff)
downloadaur-1e9735972a3cc210e282695faeed88febc0be99f.tar.gz
aur-1e9735972a3cc210e282695faeed88febc0be99f.tar.xz
Do not show current day if registration date is unknown
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@archlinux.org>
Diffstat (limited to 'web/template/account_details.php')
-rw-r--r--web/template/account_details.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/template/account_details.php b/web/template/account_details.php
index b79685be..024bd9c3 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>