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

Commit 6c32061

Browse files
committed
Small tweaks.
1 parent 0eb0bba commit 6c32061

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Traits/ImportsUsers.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,7 @@ protected function newAdldapUserQuery()
202202
{
203203
$query = $this->getAdldap()->search()->users();
204204

205-
$filter = $this->getLimitationFilter();
206-
207-
if (!empty($filter)) {
205+
if ($filter = $this->getLimitationFilter()) {
208206
// If we're provided a login limitation filter,
209207
// we'll add it to the user query.
210208
$query->rawFilter($filter);
@@ -224,19 +222,17 @@ protected function getSchema()
224222
}
225223

226224
/**
227-
* Returns the root Adldap instance.
225+
* Returns the root Adldap provider instance.
228226
*
229227
* @param string $provider
230228
*
231229
* @return \Adldap\Contracts\Connections\ProviderInterface
232230
*/
233231
protected function getAdldap($provider = null)
234232
{
235-
$ad = Adldap::getFacadeRoot();
236-
237233
$provider = $provider ?: $this->getDefaultConnectionName();
238234

239-
return $ad->getManager()->get($provider);
235+
return Adldap::getManager()->get($provider);
240236
}
241237

242238
/**

0 commit comments

Comments
 (0)