Cache private profile id list
This commit is contained in:
parent
3b7802814d
commit
fcef8c9a2f
4 changed files with 17 additions and 9 deletions
|
@ -145,6 +145,7 @@ class SettingsController extends Controller
|
|||
$user->save();
|
||||
$profile->save();
|
||||
Auth::logout();
|
||||
Cache::forget('profiles:private');
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
|
@ -161,7 +162,6 @@ class SettingsController extends Controller
|
|||
if(config('pixelfed.account_deletion') == false) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$user = Auth::user();
|
||||
if($user->is_admin == true) {
|
||||
return abort(400, 'You cannot delete an admin account.');
|
||||
|
@ -174,6 +174,7 @@ class SettingsController extends Controller
|
|||
$profile->delete_after = $ts;
|
||||
$user->save();
|
||||
$profile->save();
|
||||
Cache::forget('profiles:private');
|
||||
Auth::logout();
|
||||
return redirect('/');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue