We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3919991 commit 28ec178Copy full SHA for 28ec178
src/LDAPHelper.php
@@ -152,6 +152,24 @@ function findServerForDn($dn) {
152
return null;
153
}
154
155
+ /* get contexts, by default write context */
156
+ function getNamingContexts($readContexts = false) {
157
+ $servers = $this->Writers;
158
+ if ($readContexts) {
159
+ $servers = $this->Readers;
160
+ }
161
+ $contexts = [];
162
+ foreach($servers as $server) {
163
+ $ctxs = $server->getContext();
164
+ foreach ($ctxs as $ctx) {
165
+ if (!in_array($ctx, $contexts)) {
166
+ $contexts[] = $ctx;
167
168
169
170
+ return $contexts;
171
172
+
173
private function connectServer($uri, $bindtype = 'simple', $bindopts = [])
174
{
175
$conn = ldap_connect($uri);
0 commit comments