Do not show deletion link on the registration page

In 7df8dc8 (Add support for deleting user accounts, 2014-07-25), a link
to the account deletion page was added to the account edit form. Make
sure we only show this link if the user actually wants to edit an
account and do not show this link on the account registration page.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-07-29 14:20:15 +02:00
parent 430bf97ca6
commit 97b7e077f1

View file

@ -1,8 +1,8 @@
<?php if ($A == "UpdateAccount"): ?>
<p> <p>
<?= __('Click %shere%s if you want to permanently delete this account.', '<a href="' . get_user_uri($U) . 'delete/' . '">', '</a>') ?> <?= __('Click %shere%s if you want to permanently delete this account.', '<a href="' . get_user_uri($U) . 'delete/' . '">', '</a>') ?>
</p> </p>
<?php if ($A == "UpdateAccount"): ?>
<form id="edit-profile-form" action="<?= get_user_uri($U) . 'update/'; ?>" method="post"> <form id="edit-profile-form" action="<?= get_user_uri($U) . 'update/'; ?>" method="post">
<?php else: ?> <?php else: ?>
<form id="edit-profile-form" action="<?= get_uri('/register/'); ?>" method="post"> <form id="edit-profile-form" action="<?= get_uri('/register/'); ?>" method="post">