From 177f366a83c87ad8f00fa3646bfd0c2b91ede56d Mon Sep 17 00:00:00 2001 From: afornerot Date: Wed, 15 Jul 2020 14:07:39 +0200 Subject: [PATCH] pb sur modification du mail sur synchronisation ldap (ref #182) --- .../src/Cadoles/CoreBundle/Command/SynchroCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php index 7d131a8b..9d742b21 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php @@ -243,7 +243,8 @@ class SynchroCommand extends Command if($user->getLastname()!=$result[$ldap_lastname]||$user->getFirstname()!=$result[$ldap_firstname]||$user->getEmail()!=$result[$ldap_email]||$toadmin) { $usermail=$this->em->getRepository('CadolesCoreBundle:User')->findOneBy(array('email' => $result[$ldap_email])); - if($usermail!=$user) { + + if($usermail&&$usermail!=$user) { array_push($tberrors," - Modification dans Bundle impossible >> ".$result[$ldap_username]." un autre utilisateur a déjà ce mail = ".$result[$ldap_email]); } else {