Delete the user in a GDPR compatible way (#1151)
* Delete the user in a GDPR compatible way * Block user from calls * Style fix
This commit is contained in:
@@ -252,15 +252,12 @@ class UserController extends Controller
|
||||
public function destroy($id)
|
||||
{
|
||||
$user = $this->userRepo->findWithoutFail($id);
|
||||
|
||||
if (empty($user)) {
|
||||
Flash::error('User not found');
|
||||
|
||||
return redirect(route('admin.users.index'));
|
||||
}
|
||||
|
||||
$this->userRepo->delete($id);
|
||||
|
||||
$this->userSvc->removeUser($user);
|
||||
Flash::success('User deleted successfully.');
|
||||
|
||||
return redirect(route('admin.users.index'));
|
||||
|
||||
Reference in New Issue
Block a user