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>
This commit is contained in:
Lukas Fleischer 2016-10-17 14:45:27 +02:00
parent fb07307638
commit 1e9735972a

View file

@ -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>