diff --git a/src/LdapAuthUserProvider.php b/src/LdapAuthUserProvider.php index 863c8ae..5dd7c0d 100644 --- a/src/LdapAuthUserProvider.php +++ b/src/LdapAuthUserProvider.php @@ -50,7 +50,7 @@ public function retrieveByID($identifier) $userNameField = $this->getUsernameField(); if ($this->model) { - $model = $this->createModel()->newQuery()->find($identifier); + $model = $this->createModel()->newQuery()->where($this->getUsernameField(), $identifier)->first(); } if (isset($model)) {