From c65978f8f236eaf41a6f7440df4ed3d47699217b Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Fri, 21 Oct 2022 08:59:36 +0200 Subject: [PATCH] fix: [behavior:authKeycloak] Correctly check if the user was saved --- src/Model/Behavior/AuthKeycloakBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Behavior/AuthKeycloakBehavior.php b/src/Model/Behavior/AuthKeycloakBehavior.php index 1d76e13..4d17b61 100644 --- a/src/Model/Behavior/AuthKeycloakBehavior.php +++ b/src/Model/Behavior/AuthKeycloakBehavior.php @@ -115,7 +115,7 @@ class AuthKeycloakBehavior extends Behavior foreach ($roles as $role) { $rolesParsed[$role['name']] = $role['id']; } - if ($this->createUser($user, $clientId, $rolesParsed)) { + if (!$this->createUser($user, $clientId, $rolesParsed)) { $logChange = [ 'username' => $user['username'], 'individual_id' => $user['individual']['id'],