From 0f0b3c2d058ec6c5e27189fc4eb8a2d45b240192 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 23 Aug 2019 13:03:43 -0600 Subject: [PATCH] Update SettingsController --- app/Http/Controllers/SettingsController.php | 4 ---- resources/views/settings/security.blade.php | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 2d5e69091..89f504079 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -95,7 +95,6 @@ class SettingsController extends Controller $user = Auth::user(); abort_if(!config('pixelfed.account_deletion'), 403); abort_if($user->is_admin, 403); - abort_if($user->created_at->gt(now()->subHours(12)), 403); return view('settings.remove.temporary'); } @@ -105,7 +104,6 @@ class SettingsController extends Controller $user = Auth::user(); abort_if(!config('pixelfed.account_deletion'), 403); abort_if($user->is_admin, 403); - abort_if($user->created_at->gt(now()->subHours(12)), 403); $profile = $user->profile; $user->status = 'disabled'; $profile->status = 'disabled'; @@ -120,7 +118,6 @@ class SettingsController extends Controller { $user = Auth::user(); abort_if($user->is_admin, 403); - abort_if($user->created_at->gt(now()->subDays(7)), 403); return view('settings.remove.permanent'); } @@ -132,7 +129,6 @@ class SettingsController extends Controller $user = Auth::user(); abort_if(!config('pixelfed.account_deletion'), 403); abort_if($user->is_admin, 403); - abort_if($user->created_at->gt(now()->subDays(7)), 403); $profile = $user->profile; $ts = Carbon::now()->addMonth(); $user->status = 'delete'; diff --git a/resources/views/settings/security.blade.php b/resources/views/settings/security.blade.php index c0acc4a7c..b0802d402 100644 --- a/resources/views/settings/security.blade.php +++ b/resources/views/settings/security.blade.php @@ -27,7 +27,7 @@ @include('settings.security.device-panel') - @if(config('pixelfed.account_deletion') && !$user->is_admin && $user->created_at->lt(now()->subHours(12))) + @if(config('pixelfed.account_deletion') && !$user->is_admin)

Danger Zone

- @if(!$user->is_admin && $user->created_at->lt(now()->subDays(7)) )
  • Delete this Account

    @@ -50,7 +49,6 @@ Delete
  • - @endif @endif