From 252efb30500632ea14e85727a5acaacf2a325676 Mon Sep 17 00:00:00 2001 From: schapron Date: Mon, 27 May 2019 11:15:23 +0200 Subject: [PATCH] fix(ldap): login after manual import --- .../configObject/contact/ldapImportContact.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/www/include/configuration/configObject/contact/ldapImportContact.php b/www/include/configuration/configObject/contact/ldapImportContact.php index befdecd0834..1d656f4efa9 100644 --- a/www/include/configuration/configObject/contact/ldapImportContact.php +++ b/www/include/configuration/configObject/contact/ldapImportContact.php @@ -125,9 +125,13 @@ $arrayToReturn[$key] = array_intersect_key($_POST["contact_select"][$key], $selectedUsers); } - // restoring the $_POST['select'] array in the filtered results, in case we need it + // restoring the filtered $_POST['contact_select']['select'] as it's needed in some DB-Func.php functions $arrayToReturn['select'] = $selectedUsers; - insertLdapContactInDB($arrayToReturn); + $_POST['contact_select'] = $arrayToReturn; + unset($selectedUsers); + unset($arrayToReturn); + + insertLdapContactInDB($_POST["contact_select"]); } $form->freeze(); $valid = true;