diff options
author | Marcel Korpel <marcel.korpel@gmail.com> | 2015-09-20 20:12:25 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-09-20 22:01:23 +0200 |
commit | d5d08b8f926e8882864afbfd7446440acc1005d0 (patch) | |
tree | 345631fb4b165d00a4e09304f2cfa9ebd0b5977f /web/template | |
parent | f3ec4d1ef553259b0a617b9d11da4ece2ecc9dfd (diff) | |
download | aurweb-d5d08b8f926e8882864afbfd7446440acc1005d0.tar.xz |
Add option to hide one's email address
Implements FS#42343.
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/account_details.php | 12 | ||||
-rw-r--r-- | web/template/account_edit_form.php | 5 |
2 files changed, 16 insertions, 1 deletions
diff --git a/web/template/account_details.php b/web/template/account_details.php index 9282b2c..59a6a63 100644 --- a/web/template/account_details.php +++ b/web/template/account_details.php @@ -25,7 +25,17 @@ </tr> <tr> <th><?= __("Email Address") . ":" ?></th> - <td><a href="mailto:<?= htmlspecialchars($row["Email"], ENT_QUOTES) ?>"><?= htmlspecialchars($row["Email"], ENT_QUOTES) ?></a></td> + <td> + <?php + if ($row["HideEmail"] == 1 && !has_credential(CRED_ACCOUNT_SEARCH)): + print "<em>" . __("hidden") . "</em>"; + else: + ?> + <a href="mailto:<?= htmlspecialchars($row["Email"], ENT_QUOTES) ?>"><?= htmlspecialchars($row["Email"], ENT_QUOTES) ?></a> + <?php + endif; + ?> + </td> </tr> <tr> <th><?= __("Real Name") . ":" ?></th> diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index 83aedb0..16655c0 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -76,6 +76,11 @@ <em><?= __("Please ensure you correctly entered your email address, otherwise you will be locked out.") ?></em> </p> + <p> + <label for="id_hide"><?= __("Hide Email Address") ?>:</label> + <input type="checkbox" name="H" id="id_hide" <?= $H ? 'checked="checked"' : '' ?> /> + </p> + <?php if ($A == "UpdateAccount"): ?> <p> <label for="id_passwd1"><?= __("Password") ?>:</label> |