mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add support for deleting user accounts
Users can now delete their own accounts by clicking a link in the account edit form and confirming the deletion on a follow-up page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
f4ee1278e5
commit
7df8dc8bcb
5 changed files with 45 additions and 0 deletions
22
web/template/account_delete.php
Normal file
22
web/template/account_delete.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<p>
|
||||
<?= __('You can use this form to permanently delete the AUR account %s.', '<strong>' . htmlspecialchars($username) . '</strong>') ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= __('%sWARNING%s: This action cannot be undone.', '<strong>', '</strong>') ?>
|
||||
</p>
|
||||
|
||||
<form id="edit-profile-form" action="<?= get_user_uri($username) . 'delete/'; ?>" method="post">
|
||||
<fieldset>
|
||||
<input type="hidden" name="Action" value="<?= $A ?>" />
|
||||
<input type="hidden" name="ID" value="<?= $UID ?>" />
|
||||
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<p><input type="checkbox" name="confirm_Delete" value="1" />
|
||||
<?= __("Confirm deletion") ?></p>
|
||||
|
||||
<p>
|
||||
<input type="submit" class="button" value="<?= __("Delete") ?>" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue