From 90df04ca4f3b95d08c64de210229f10cfafa9e90 Mon Sep 17 00:00:00 2001 From: May <110405507+paul-oureib@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:17:55 +0100 Subject: [PATCH] fix(users injection): make sure that all users can reach api (#12) * make all users reach api * fix * change reach_api/reach_api_rt value type from enum to int Co-authored-by: Kevin Duret * fix types on variables --------- Co-authored-by: Kevin Duret --- src/Infrastructure/MySQL/UserRepository.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/MySQL/UserRepository.php b/src/Infrastructure/MySQL/UserRepository.php index a3a7fc5..66e7048 100644 --- a/src/Infrastructure/MySQL/UserRepository.php +++ b/src/Infrastructure/MySQL/UserRepository.php @@ -37,7 +37,7 @@ public function inject(User $user, array $properties, array $injectedIds): array $maxId = $firstId + $count; $baseQuery = 'INSERT INTO contact ' . - '(contact_id, contact_name, contact_alias, contact_email, contact_lang, contact_activate, contact_admin, contact_oreon) ' . + '(contact_id, contact_name, contact_alias, contact_email, contact_lang, contact_activate, contact_admin, contact_oreon, reach_api, reach_api_rt) ' . 'VALUES '; $valuesQuery = ''; @@ -60,7 +60,9 @@ public function inject(User $user, array $properties, array $injectedIds): array '"en_US.UTF-8",' . '"1",' . '"' . $isAdmin . '",' . - '"1"' . + '"1",' . + '1,' . + '1' . '),'; if ($insertCount === 50000) { $query = rtrim($baseQuery . $valuesQuery, ',');