From c51436e642c87f6a2454d551f35af75716b73486 Mon Sep 17 00:00:00 2001
From: VESSILLER <lvessiller@open-dsi.fr>
Date: Tue, 28 Jan 2020 09:53:48 +0100
Subject: [PATCH] FIX user current

---
 lib/Controller/PageController.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 32d541d..ed9857b 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -1537,7 +1537,7 @@ class PageController extends Controller {
                                         $this->_logCsvLine($errorMsg, self::LOG_ERROR, $siret, $matricule, $fullname, $zipCity, $dateStart, $dateEnd, $email);
                                         $this->_processErrorMsg(-1, $errorMsg, $phaseStep, $csvCheckLineNum);
                                     }
-                                    $userFindByEmail = $userFindByEmailList[0];
+                                    $userFindByEmail = current($userFindByEmailList);
                                     $userFindByEmailId = $userFindByEmail->getUID();
 
                                     if ($this->_process->getHasError() <= 0) {
-- 
GitLab