mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 14:03:16 +00:00
Update SettingsController
This commit is contained in:
parent
5b68d147d2
commit
6f4da63a83
1 changed files with 6 additions and 0 deletions
|
@ -149,11 +149,17 @@ class SettingsController extends Controller
|
||||||
|
|
||||||
public function removeAccountPermanent(Request $request)
|
public function removeAccountPermanent(Request $request)
|
||||||
{
|
{
|
||||||
|
if(config('pixelfed.account_deletion') == false) {
|
||||||
|
abort(404);
|
||||||
|
}
|
||||||
return view('settings.remove.permanent');
|
return view('settings.remove.permanent');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeAccountPermanentSubmit(Request $request)
|
public function removeAccountPermanentSubmit(Request $request)
|
||||||
{
|
{
|
||||||
|
if(config('pixelfed.account_deletion') == false) {
|
||||||
|
abort(404);
|
||||||
|
}
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
if($user->is_admin == true) {
|
if($user->is_admin == true) {
|
||||||
return abort(400, 'You cannot delete an admin account.');
|
return abort(400, 'You cannot delete an admin account.');
|
||||||
|
|
Loading…
Reference in a new issue