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:
Matthias Jentsch 2014-06-06 15:39:01 +02:00
parent 06296f29d8
commit 953d22244a
1 changed files with 9 additions and 1 deletions

View File

@ -353,10 +353,18 @@ class Connection
return $dir;
}
protected function discoverServerlistForDomain($domain)
public static function discoverServerlistForDomain($domain)
{
$domains = array();
$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);
foreach ($ldap_records as $record) {
$domains[$record['target']] = true;
}
return array_keys($domains);
}
protected function prepareNewConnection()