Skip to content

Commit

Permalink
fix: import parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineLemarchand committed Oct 21, 2024
1 parent 1d926ab commit c691a49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ private static function createOrUpdateUser($userId) {
$OidcTranslation = [
'id' => 'id',
'name' => 'name',
'given_name' => 'firstName',
'family_name' => 'lastName',
'given_name' => 'firstname',
'family_name' => 'realname',
'phone_number' => 'phone',
'email' => 'email'
];
Expand All @@ -243,7 +243,7 @@ private static function createOrUpdateUser($userId) {
$profile = $distantUser['profile'];
$profile += ['id' => $distantUser['id']];

$query = "SELECT * FROM glpi_users
$query = "SELECT glpi_users.id FROM glpi_users
LEFT JOIN glpi_useremails ON glpi_users.id = glpi_useremails.users_id
WHERE " . $OidcTranslation[$config['duplicate']] . " = '" . $profile[$apiMappings[$config['duplicate']]] . "'";
$localUser = iterator_to_array($DB->query($query));
Expand Down

0 comments on commit c691a49

Please sign in to comment.