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

Commit cc16faf

Browse files
committed
Set configured auth connection upon instantiation
- Applies to #279
1 parent bc2932b commit cc16faf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Resolvers/UserResolver.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class UserResolver implements ResolverInterface
3737
public function __construct(AdldapInterface $ldap)
3838
{
3939
$this->ldap = $ldap;
40+
41+
$this->setConnection($this->getAuthConnection());
4042
}
4143

4244
/**
@@ -196,4 +198,14 @@ protected function getProvider() : ProviderInterface
196198
{
197199
return $this->ldap->getProvider($this->connection);
198200
}
201+
202+
/**
203+
* Returns the connection name of the authentication provider.
204+
*
205+
* @return string
206+
*/
207+
protected function getAuthConnection()
208+
{
209+
return Config::get('adldap_auth.connection', 'default');
210+
}
199211
}

0 commit comments

Comments
 (0)