Admin: User import: Add ID and username of the user that already exists with the same email to the CSV

Co-authored-by: Juan Cortizas Ponte <124381395+juancpbinario@users.noreply.github.com>
pull/5092/head
juancp-contidosdixitais 2 years ago committed by GitHub
parent 57ed5746d2
commit a83430e58f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      main/admin/user_import.php

@ -153,6 +153,8 @@ function validate_data($users, $checkUniqueEmail = false)
} else { } else {
$userFromEmail = api_get_user_info_from_email($user['Email']); $userFromEmail = api_get_user_info_from_email($user['Email']);
if (!empty($userFromEmail)) { if (!empty($userFromEmail)) {
$user['id'] = $userFromEmail['id'];
$user['UserName'] = $userFromEmail['username'];
$user['message'] .= Display::return_message(get_lang('EmailUsedTwice'), 'warning'); $user['message'] .= Display::return_message(get_lang('EmailUsedTwice'), 'warning');
$user['has_error'] = true; $user['has_error'] = true;
} else { } else {

Loading…
Cancel
Save