You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(searchUser): New Param baseDN which overrides the default baseDN
fix(search): Suppress `ldap_search`'s errors in favor of Yii's `::error` logging
feat(searchGroup): Add new function `searchGroup` which helps finding groups and (optionally) its members
feat(attributes): Check which attributes are single-valued to always return an array (even with single value) for non-single-valued attributes. This avoids returning attributes as array(non-array per entry.
fix(results): Return multi-value attribute values as array sintead of conact them.
fix(sid): Fix generating small SIDs
@@ -37,7 +37,7 @@ class LdapAuth extends BaseObject
37
37
38
38
/**
39
39
* If false (default) any user search would return the whole result.
40
-
* If true, the script checks every users sidHistory and only return results which are newer (migrated).
40
+
* If true, the script checks every user sidHistory and only return results which are newer (migrated).
41
41
* A use case for `true`: You have two domains and user "Foo" was copied from Domain 1 to Domain 2 without deleting it from Domain 1 - now you have 2 results for a search "Foo", but the entry in Domain 2 has a set "sidHistory" with its sid from Domain 1.
42
42
* Setting this tp true will filter out the "Foo" from Domain 1, since its sid is listed in the Domain 2 entry of it.
43
43
*
@@ -69,6 +69,9 @@ class LdapAuth extends BaseObject
69
69
private$_l;
70
70
private$_username;
71
71
private$_curDn;
72
+
private$_curDomainHostname;
73
+
74
+
private$_singleValuedAttrs;
72
75
73
76
publicfunctioninit()
74
77
{
@@ -308,6 +311,7 @@ public function login($username, $password, $domainKey = false, $fetchUserDN = f
@@ -366,13 +370,14 @@ public function fetchUserData($attributes = "")
366
370
* @param string|null $searchFor Search-Term
367
371
* @param array|null $attributes Attributes to get back
368
372
* @param string|null $searchFilter Filter string. Set %searchFor% als placeholder to search for $searchFor
369
-
* @param integer $domainKey You can provide integer domainkey, this is then used as target domain! Otherwise it searches in all domains
373
+
* @param int|null $domainKey You can provide integer domainkey, this is then used as target domain! Otherwise it searches in all domains
370
374
* @param bool $onlyActiveAccounts SHould the search result only contain active accounts? => https://www.der-windows-papst.de/2016/12/18/active-directory-useraccountcontrol-values/
371
375
* @param bool $allDomainsHaveToBeReachable True: All configured domains need to be reachable in order to get a result. If one is not reachable, false will be returned
376
+
* @param string|null $baseDN Use given BaseDN instead of configured one. This normally requires the exact domainKey being set as well.
372
377
* @return array|false An Array with the results, indexed by their SID - false if an ERROR occured!
0 commit comments