Browse Source

Merge branch 'hotfix/V8-7165-correction-pour-que-les-vnements' into develop

Olivier Massot 9 tháng trước cách đây
mục cha
commit
6cc18ec281

+ 6 - 2
ot_connect/Classes/Service/OtAuthenticationService.php

@@ -162,7 +162,11 @@ class OtAuthenticationService extends AbstractAuthenticationService
         //   generated in the last minutes, to avoid unnecessary operations *
         //   generated in the last minutes, to avoid unnecessary operations *
 
 
         if ($this->shouldUserBeUpdated($username, $isBackend)) {
         if ($this->shouldUserBeUpdated($username, $isBackend)) {
-            $wasUpdated = $this->createOrUpdateUser($isBackend);
+            try {
+                $wasUpdated = $this->createOrUpdateUser($isBackend);
+            } catch (\RuntimeException) {
+                $wasUpdated = false;
+            }
 
 
             if (!$wasUpdated) {
             if (!$wasUpdated) {
                 // An error happened during the update of the user's data
                 // An error happened during the update of the user's data
@@ -414,7 +418,7 @@ class OtAuthenticationService extends AbstractAuthenticationService
         }
         }
 
 
         if ($isBackend && empty($groupsUid)) {
         if ($isBackend && empty($groupsUid)) {
-            throw new \Exception("No BE_group found for user " . $userApiData['username']);
+            throw new \RuntimeException("No BE_group found for user " . $userApiData['username']);
         }
         }
 
 
         $user_row['usergroup'] = join(',', $groupsUid);
         $user_row['usergroup'] = join(',', $groupsUid);