mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Add option to users to delete their account from profile page
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2018-01-31 DariusIII
|
||||
* Chg: Add option to users to delete their account from profile page
|
||||
* Fix: Fix count of regexes for pager in Regexes class
|
||||
* Chg: Add option to fixtures up/down commands to specifiy which table fixtures to truncate or add
|
||||
* Chg: Update some faulty regexes
|
||||
|
||||
@@ -51,6 +51,7 @@ switch ($page->page) {
|
||||
case 'post_edit':
|
||||
case 'profile':
|
||||
case 'profileedit':
|
||||
case 'profile_delete':
|
||||
case 'queue':
|
||||
case 'register':
|
||||
case 'sabqueuedata':
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
if (! User::isLoggedIn()) {
|
||||
$page->show403();
|
||||
}
|
||||
|
||||
$userId = $_GET['id'];
|
||||
|
||||
if ($userId !== null) {
|
||||
User::logout();
|
||||
User::deleteUser($userId);
|
||||
header('Location: '.WWW_TOP.'/');
|
||||
}
|
||||
@@ -243,6 +243,7 @@
|
||||
<a class="btn btn-primary" href="{$smarty.const.WWW_TOP}profileedit">Edit
|
||||
Profile</a>
|
||||
{/if}
|
||||
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
{if !$publicview}
|
||||
<li style="vertical-align:text-bottom;"><a href="{$smarty.const.WWW_TOP}/profileedit" class="btn btn-small btn-warning">Edit</a></li>
|
||||
{/if}
|
||||
<li style="vertical-align:text-bottom;"><a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a></li>
|
||||
</ul>
|
||||
<table class="data table" width="100%">
|
||||
<tr>
|
||||
|
||||
@@ -251,6 +251,7 @@
|
||||
<a class="btn btn-primary" href="{$smarty.const.WWW_TOP}profileedit">Edit
|
||||
Profile</a>
|
||||
{/if}
|
||||
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -243,6 +243,7 @@
|
||||
<a class="btn btn-primary" href="{$smarty.const.WWW_TOP}profileedit">Edit
|
||||
Profile</a>
|
||||
{/if}
|
||||
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user