From 8ccec8fce6c4d8cf098b59805988f9c9123d59a8 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Mon, 25 Sep 2023 19:18:30 +0100 Subject: [PATCH] [4.x] Impersonate should check on id() not full class (#8763) --- src/Actions/Impersonate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Actions/Impersonate.php b/src/Actions/Impersonate.php index c27d11c127..8286f29f4a 100644 --- a/src/Actions/Impersonate.php +++ b/src/Actions/Impersonate.php @@ -23,7 +23,7 @@ public function visibleTo($item) return false; } - return $item instanceof UserContract && $item != User::current(); + return $item instanceof UserContract && $item->id() != User::current()->id(); } public function visibleToBulk($items)