From f748801e9cd2ae0f8f409b49011ab952ccb10c99 Mon Sep 17 00:00:00 2001 From: Sam Harvey Date: Thu, 26 Sep 2024 12:51:58 +0100 Subject: [PATCH] correct user accessor --- src/Http/Controllers/CP/Users/PasswordController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/CP/Users/PasswordController.php b/src/Http/Controllers/CP/Users/PasswordController.php index d707891968..03abbda110 100644 --- a/src/Http/Controllers/CP/Users/PasswordController.php +++ b/src/Http/Controllers/CP/Users/PasswordController.php @@ -17,7 +17,7 @@ public function update(Request $request, $user) { throw_unless($user = User::find($user), new NotFoundHttpException); - $updatingOwnPassword = $user->id() == $request->user()->id(); + $updatingOwnPassword = $user->id() == User::fromUser($request->user())->id(); $this->authorize('editPassword', $user);