Skip to content

Commit

Permalink
Update LdapAuthServiceProvider.php
Browse files Browse the repository at this point in the history
swap config only if ldap key is present
  • Loading branch information
frankmichel authored Mar 14, 2024
1 parent 21ca1e0 commit b38f3e2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/LdapAuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ protected function registerAuthProvider(): void
});

Auth::provider('eloquent', function ($app, array $config) {
$config = $this->swapLdapConfig($config);

return array_key_exists('ldap', $config)
? $this->makeDatabaseUserProvider($config)
? $this->makeDatabaseUserProvider($this->swapLdapConfig($config))
: $this->makeEloquentUserProvider($config);
});
}
Expand Down

0 comments on commit b38f3e2

Please sign in to comment.