From 7f1259274fd1ab6edd35de4461b1569b9e68c748 Mon Sep 17 00:00:00 2001 From: Ben Walters <43746367+BenWalters@users.noreply.github.com> Date: Tue, 19 Jul 2022 11:42:39 +0100 Subject: [PATCH] [9.x] Protect against ambiguous columns Resolving https://github.com/laravel/framework/issues/43274 --- src/Illuminate/Auth/EloquentUserProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Auth/EloquentUserProvider.php b/src/Illuminate/Auth/EloquentUserProvider.php index 44f58981cb5f..2bcd872f9950 100755 --- a/src/Illuminate/Auth/EloquentUserProvider.php +++ b/src/Illuminate/Auth/EloquentUserProvider.php @@ -48,7 +48,7 @@ public function retrieveById($identifier) $model = $this->createModel(); return $this->newModelQuery($model) - ->where($model->getAuthIdentifierName(), $identifier) + ->where($model->qualifyColumn($model->getAuthIdentifierName()), $identifier) ->first(); } @@ -64,7 +64,7 @@ public function retrieveByToken($identifier, $token) $model = $this->createModel(); $retrievedModel = $this->newModelQuery($model)->where( - $model->getAuthIdentifierName(), $identifier + $model->qualifyColumn($model->getAuthIdentifierName()), $identifier )->first(); if (! $retrievedModel) {