Commit 476e80dc authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '2895-add-support-for-paginating-ldap-result-in-setup' into '1.4-dev'

Resolve "Add support for paginating ldap result in setup"

See merge request fusiondirectory/fd!669
parents 16900698 f31ac060
......@@ -1069,12 +1069,11 @@ class setupStepMigrate extends setupStep
}
while ($attrs = $ldap->fetch()) {
$object_base = preg_replace('/^[^,]+,'.preg_quote($objects_ou, '/').'/i', '', $attrs['dn']);
$object_base = preg_replace('/^[^,]+,'.preg_quote($objects_ou, '/').'/i', '', $attrs['dn'], 1, $pregCount);
$base = preg_replace('/^[^,]+,/', '', $attrs['dn']);
/* Check if entry is in a valid department
*/
if (!in_array($object_base, $config->getDepartmentList())) {
/* Check if entry is in a valid department */
if (($pregCount === 0) || !in_array($object_base, $config->getDepartmentList())) {
/* Build groupid depending on base and objectClasses */
$groupid = md5($base.implode('', $attrs['objectClass']));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment