User import error: Provide both a User Name and an Email Address

SuiteCRM version: Version 7.11.15
OS/Distro: Linux/Ubuntu

Issue:
When importing a user, on Step 4 this error is thrown:

Provide both a User Name and an Email Address.
import_error

Details:

  • Both username & email address are correctly provided in the csv file & correctly mapped in the import wizard
  • Outbound email and System email settings are correctly configured
  • Even though this error message is thrown on step 4, the user is successfully imported (with correct username and email address)

Debug info, Technical details:

  • File & directory permissions are absolutely correct
  • No errors are logged in PHP error log
  • Contents of suitecrm.log (I am unsure if these are the exact reasons for the reported problem):
Invalid Referrer: expected the Save action to be called from the User's Profile Edit View
Email address save error
Caught error: stat(): stat failed for upload/import/status_1.csv
Caught error: touch(): UploadStream::stream_metadata is not implemented!
File upload://import/status_1.csv cannot be touched
  • If the below is set in config_override.php then the error is not thrown:
    $sugar_config['passwordsetting']['SystemGeneratedPasswordON'] = NULL;

Hey,

Thanks for raising this in such detail, I’ve had a look and I’m able to replicate it on 7.11.18

It does indeed seem to be related to Password Generation functionality, thanks for noting the sugar_config option.

The String used in the error message, “Provide both a User Name and an Email Address”, seems to be used in /modules/Users/GeneratePassword.php
(As the LBL value: “LBL_PROVIDE_USERNAME_AND_EMAIL”)

I haven’t confirmed, but I’m assuming that the CRM is attempting to Generate a Password for this imported User, as none is provided in the CSV


Anyways, this seems like an issue, so thanks for raising!

I would recommend raising this on the Github Repository, if an issue doesn’t exist for it already
This’ll allow it to be logged & tracked much easier
(Or I can raise it for you, if you wish :slight_smile: )

Thanks again!

1 Like

Thank you @John for taking time to reproduce the issue - I have reported this issue in the Github Repo.

Thanks!

1 Like