LDAP: use consolidated method for determining config prefix
This commit is contained in:
parent
a8ac4bdf79
commit
9f7d780276
|
@ -26,12 +26,7 @@ OCP\JSON::checkAdminUser();
|
|||
OCP\JSON::checkAppEnabled('user_ldap');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$query = \OCP\DB::prepare('
|
||||
SELECT DISTINCT `configkey`
|
||||
FROM `*PREFIX*appconfig`
|
||||
WHERE `configkey` LIKE ?
|
||||
');
|
||||
$serverConnections = $query->execute(array('%ldap_login_filter'))->fetchAll();
|
||||
$serverConnections = \OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes();
|
||||
sort($serverConnections);
|
||||
$lk = array_pop($serverConnections);
|
||||
$ln = intval(str_replace('s', '', $lk));
|
||||
|
|
Loading…
Reference in New Issue