Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit d0640ad

Browse files
committed
Allow extending the DatabaseUserProvider
1 parent 65c854a commit d0640ad

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/AdldapAuthServiceProvider.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ protected function makeUserProvider(Hasher $hasher, array $config)
8989
{
9090
$provider = Config::get('ldap_auth.provider', DatabaseUserProvider::class);
9191

92-
// The DatabaseUserProvider has some extra dependencies needed,
93-
// so we will validate that we have them before
94-
// constructing a new instance.
95-
if ($provider == DatabaseUserProvider::class) {
92+
// The DatabaseUserProvider requires a model to be configured
93+
// in the configuration. We'll validate this here.
94+
if (is_a($provider, DatabaseUserProvider::class, $allowString = true)) {
9695
$model = array_get($config, 'model');
9796

9897
if (!$model) {

src/Commands/SyncPassword.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected function applyPassword($password)
6565
{
6666
// If the model has a mutator for the password field, we
6767
// can assume hashing passwords is taken care of.
68-
// Otherwise, we will bcrypt it normally.
68+
// Otherwise, we will hash it normally.
6969
$password = $this->model->hasSetMutator($this->column()) ? $password : Hash::make($password);
7070

7171
$this->model->setAttribute($this->column(), $password);

0 commit comments

Comments
 (0)