Add host discovery to authentication page
Find all domains for a given hostname. refs #6093 Conflicts: application/forms/Install/AuthenticationPage.php
This commit is contained in:
parent
06296f29d8
commit
953d22244a
|
@ -353,10 +353,18 @@ class Connection
|
||||||
return $dir;
|
return $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function discoverServerlistForDomain($domain)
|
public static function discoverServerlistForDomain($domain)
|
||||||
{
|
{
|
||||||
|
$domains = array();
|
||||||
$ldaps_records = dns_get_record('_ldaps._tcp.' . $domain, DNS_SRV);
|
$ldaps_records = dns_get_record('_ldaps._tcp.' . $domain, DNS_SRV);
|
||||||
|
foreach ($ldaps_records as $record) {
|
||||||
|
$domains[$record['target']] = true;
|
||||||
|
}
|
||||||
$ldap_records = dns_get_record('_ldap._tcp.' . $domain, DNS_SRV);
|
$ldap_records = dns_get_record('_ldap._tcp.' . $domain, DNS_SRV);
|
||||||
|
foreach ($ldap_records as $record) {
|
||||||
|
$domains[$record['target']] = true;
|
||||||
|
}
|
||||||
|
return array_keys($domains);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function prepareNewConnection()
|
protected function prepareNewConnection()
|
||||||
|
|
Loading…
Reference in New Issue