2012-05-14 06:58:58 -04:00
|
|
|
<?php
|
|
|
|
|
|
2012-05-17 13:33:38 -04:00
|
|
|
//detect if we can switch on naming guidelines. We won't do it on conflicts.
|
|
|
|
|
//it's a bit spaghetti, but hey.
|
2012-08-23 12:29:43 -04:00
|
|
|
$state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'unset');
|
2013-04-20 16:45:17 -04:00
|
|
|
if($state === 'unset') {
|
2012-05-18 11:38:22 -04:00
|
|
|
OCP\Config::setSystemValue('ldapIgnoreNamingRules', false);
|
2012-05-28 07:57:45 -04:00
|
|
|
}
|
2012-07-02 14:31:07 -04:00
|
|
|
|
2013-09-13 13:01:40 -04:00
|
|
|
$configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true);
|
|
|
|
|
$ldap = new OCA\user_ldap\lib\LDAP();
|
|
|
|
|
foreach($configPrefixes as $config) {
|
|
|
|
|
$connection = new OCA\user_ldap\lib\Connection($ldap, $config);
|
|
|
|
|
$value = \OCP\Config::getAppValue('user_ldap',
|
|
|
|
|
$config.'ldap_uuid_attribute', 'auto');
|
|
|
|
|
\OCP\Config::setAppValue('user_ldap',
|
|
|
|
|
$config.'ldap_uuid_user_attribute', $value);
|
|
|
|
|
\OCP\Config::setAppValue('user_ldap',
|
|
|
|
|
$config.'ldap_uuid_group_attribute', $value);
|
|
|
|
|
|
|
|
|
|
$value = \OCP\Config::getAppValue('user_ldap',
|
|
|
|
|
$config.'ldap_expert_uuid_attr', 'auto');
|
|
|
|
|
\OCP\Config::setAppValue('user_ldap',
|
|
|
|
|
$config.'ldap_expert_uuid_user_attr', $value);
|
|
|
|
|
\OCP\Config::setAppValue('user_ldap',
|
|
|
|
|
$config.'ldap_expert_uuid_group_attr', $value);
|
2013-01-24 16:39:05 -05:00
|
|
|
}
|