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

Commit 882de3f

Browse files
committed
Added more param options for new user queries.
1 parent f0f3c9e commit 882de3f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Traits/ImportsUsers.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,16 @@ protected function handleAttributeRetrieval(User $user, $field)
195195
/**
196196
* Returns a new Adldap user query.
197197
*
198+
* @param string|null $provider
199+
* @param string|null $filter
200+
*
198201
* @return \Adldap\Query\Builder
199202
*/
200-
protected function newAdldapUserQuery()
203+
protected function newAdldapUserQuery($provider = null, $filter = null)
201204
{
202-
$query = $this->getAdldap()->search()->users();
205+
$query = $this->getAdldap($provider)->search()->users();
203206

204-
if ($filter = $this->getLimitationFilter()) {
207+
if ($filter = $this->getLimitationFilter() ?: $filter) {
205208
// If we're provided a login limitation filter,
206209
// we'll add it to the user query.
207210
$query->rawFilter($filter);

0 commit comments

Comments
 (0)