Skip to content

Commit 90df04c

Browse files
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 <kduret@centreon.com> * fix types on variables --------- Co-authored-by: Kevin Duret <kduret@centreon.com>
1 parent 6f7a4c9 commit 90df04c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Infrastructure/MySQL/UserRepository.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function inject(User $user, array $properties, array $injectedIds): array
3737
$maxId = $firstId + $count;
3838

3939
$baseQuery = 'INSERT INTO contact ' .
40-
'(contact_id, contact_name, contact_alias, contact_email, contact_lang, contact_activate, contact_admin, contact_oreon) ' .
40+
'(contact_id, contact_name, contact_alias, contact_email, contact_lang, contact_activate, contact_admin, contact_oreon, reach_api, reach_api_rt) ' .
4141
'VALUES ';
4242
$valuesQuery = '';
4343

@@ -60,7 +60,9 @@ public function inject(User $user, array $properties, array $injectedIds): array
6060
'"en_US.UTF-8",' .
6161
'"1",' .
6262
'"' . $isAdmin . '",' .
63-
'"1"' .
63+
'"1",' .
64+
'1,' .
65+
'1' .
6466
'),';
6567
if ($insertCount === 50000) {
6668
$query = rtrim($baseQuery . $valuesQuery, ',');

0 commit comments

Comments
 (0)