Import Users via CSV

Here’s where the filename gets set:

  CSV_FILE_PATH = ENV["CSV_USER_FILE"] || "/var/www/discourse/tmp/users.csv"

So either put the file there, or set ENV variable CSV_USER_FILE to wherever you put the file.

Oh, but the first thing the script does is read in ALL of the CSVs it expects (all of those @… = load_csv lines), so you’ll need to comment out or delete the ones you don’t want. And the import_users looks at custom field data, so you need to change that too.

If that’s not enough of a hint, and you’ve got a budget, email (in my profile) me a number and I’ll see what I can find a way to help you for that number.

2 Likes