Skip to content

Commit

Permalink
Check if user is deleted on Permissions and Notifications pages
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Oct 3, 2024
1 parent eb5c8fa commit 6af3896
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Http/Controllers/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ public function permissions($id)

$user = User::findOrFail($id);

if ($user->isDeleted()) {
abort(404);
}

$mailboxes = Mailbox::all();

$users = $this->getUsersForSidebar($id);
Expand Down Expand Up @@ -316,6 +320,10 @@ public function notifications($id)
$user = User::findOrFail($id);
$this->authorize('update', $user);

if ($user->isDeleted()) {
abort(404);
}

$subscriptions = $user->subscriptions()->select('medium', 'event')->get();

$person = '';
Expand Down

0 comments on commit 6af3896

Please sign in to comment.