pb sur modification du mail sur synchronisation ldap (ref #182)

This commit is contained in:
afornerot 2020-07-15 14:07:39 +02:00
parent 39c469fd45
commit 177f366a83
1 changed files with 2 additions and 1 deletions

View File

@ -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 {