From e566e404041bc5af3afe28ec3e717e7c52440370 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Tue, 8 Sep 2020 00:07:50 +0100 Subject: [PATCH] Update target user in logs --- app/Policies/BanPolicy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Policies/BanPolicy.php b/app/Policies/BanPolicy.php index e252976..754458e 100644 --- a/app/Policies/BanPolicy.php +++ b/app/Policies/BanPolicy.php @@ -47,7 +47,7 @@ class BanPolicy Log::debug("Authorization check started", [ 'requiredRoles' => 'admin', 'hasRequiredRole' => $user->hasRole('admin'), - 'targetUser' => $user->username, + 'targetUser' => $targetUser->username, 'isCurrentUser' => Auth::user()->is($user) ]); return $user->hasRole('admin') && $user->isNot($targetUser);