[TH] User Import and Export [Deleted]

Hiya Waindigo,

Just wondered what information this exports/imports? Just username? Email? etc

Cheers
Paul
 
The export is on the user search screen for users who have the proper permission. It's not in the adminCP.
 
Mine says, "Import Users" and "Create User". I also don't see any user group permission settings for the addon. It says its installed on my dashboard. I'm an admin as well.
 
I successfully exported users but I cannot figure out the expected XML format to import users. I tried simply changing the <users_export> to <users_import> to bring a user back, but nothing seems to happen.

Edit: Getting a little farther. I see that I need to keep it as <users_export>. I hacked a little and discovered the users are reading into the $users array correctly, but nothing is getting inserted into the db.

It looks like users can be updated with the import, but how do you import new users?
 
Last edited:
I got the new users to successfully import by adding these 3 lines to \library\Waindigo\UserImpEx\Extend\XenForo\Model\User.php at line 183 of massImportUsers()

$dw->setPassword('randompassword', false, null, true); // apparently a password is needed???
$dw->setOption(XenForo_DataWriter_User::OPTION_ADMIN_EDIT, true);
$user['user_group_id']=2; // This is the "registered" groupid
 
Waindigo updated User Import and Export by Waindigo with a new update entry:

Version 1.0.1 released

New features:
  • Failed imports now produce a form to correct any errors and re-import.
Bug fixes:
  • Fixed bug that unable to import new users due to no password being present. A password field is now accepted, or if no field is set then no password is set (i.e. user is unable to login). Default user group and language are also set if user_group_id and language_id are not set.

Read the rest of this update entry...
 
What format does the CSV file need to be in for import?

I used "User Name" "Email Address" and "Password" but only the Password field gets acknowledged. The user name and email address give me an error and ask me to fill in the fields manually
 
For CSV, you need to use the same column names as in the database. So it will be username and email.
 
Thanks I figured it out. However, when I set a password in the CSV file it doesn't seem to import along with the email address.

I try to log the imported user in with the email and password in the CSV file but get a password error.

Am I doing something wrong here?
 
Figured it out. All header fields needed to be all lowercase with no empty columns (for CSV).

username - email - password

Worked like a charm.
 
The import new users isn't working for me. When I import a csv file, no one is added. I have tried all suggestions listed here.
I am able to export a user, make a username change and import it (using XML).
Help greatly appreciated!
 
It's not perfect for me, but it's working. Are you getting any error message, or just nothing happening? You have to make sure that your column headers match PERFECTLY so I find that it's best to export a sample record and then use those column headers exactly.
 
This is from the exported xml file:

<user username="test" email="test@test.com" gender="" custom_title="" timezone="America/New_York">

No error messages. Nothing happens. My headers are username email password.
 
Top Bottom