I am trying to import users. I have WordPress-style hashed passwords for them but they are being changed (re-hashed?) on import. The Sample Data shows a correct value and, if I paste a password directly in the database it works. All other fields seem to be OK but the passwords are not.
It seems that passwords are always re-hashed on import.
A way round it is to do a direct import of basic user information including passwords to the wp_users table using phpMyAdmin or similar (column names eg:
user_login,user_pass,user_nicename,user_email,user_registered,user_status,display_name)
and then use the User Meta Import to add extra fields, including First Name, Last Name and Role afterwards.
You can use alternate approach, Import users by UMP importer with their password. UMP will rehash the password. But you can add some bit of code to update raw password directly to wp_users table.
If you are using 1.1.3rc2, open user-meta/controllers/pro/umExportImportController.php
and add following codes between line 273 and 274
global $wpdb;
$wpdb->update( $wpdb->users, array('user_pass'=>$response->user_pass), array('ID'=>$response->ID) );
I have just had a go at that but the passwords were still hashed.
In Import dialogue:
CSV Header: user_pass, Assigning Field: Password, Sample Data: $P$BOFT58J5HzGSJ.ZCcd/IpeNDOCF7Qn/
In umExportImportController.php
if( !is_wp_error( $response ) ){
global $wpdb;
$wpdb->update( $wpdb->users, array('user_pass'=>$response->user_pass), array('ID'=>$response->ID) );
if( isset( $_POST['send_email'] ) )
This is a hack to the core code so would be lost on updating the plugin, so I would probably only used it as a one-off method anyway?
This reply was modified 11 years, 8 months ago by houfton. Reason: typo
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.