Skip to content

Commit

Permalink
1.1.14
Browse files Browse the repository at this point in the history
* Provide domainName for searched users - only if needed (more than 1 domain configured)
  • Loading branch information
robin.kluth committed Sep 30, 2020
1 parent 03b4464 commit 8072fde
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/LdapAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ public function searchUser($searchFor, $attributes = "", $searchFilter = "", $au
continue;
}
$sid = self::SIDtoString($entry['objectsid'][0]);
array_push($return, array_merge(['sid' => $sid, 'dn' => $entry['dn'], 'domainKey' => $i, 'domainName' => $this->domains[$i]['name']], self::handleEntry($entry)));
$additionalData = ['sid' => $sid, 'dn' => $entry['dn'], 'domainKey' => $i];
if (count($this->domains) > 1) {
// Enable domainName output if more than one domains configured
$additionalData['domainName'] = $this->domains[$i]['name'];
}
array_push($return, array_merge($additionalData, self::handleEntry($entry)));
}
}
$i++;
Expand Down

0 comments on commit 8072fde

Please sign in to comment.