Skip to content

Instantly share code, notes, and snippets.

@louisreingold
Last active January 14, 2022 16:20
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save louisreingold/1ef75e6b3623c5c66e4443dc762bfd52 to your computer and use it in GitHub Desktop.
Save louisreingold/1ef75e6b3623c5c66e4443dc762bfd52 to your computer and use it in GitHub Desktop.
add_action( 'pmxi_saved_post', 'post_saved', 10, 1 );
function post_saved( $id ) {
global $wpdb;
$pass = get_user_meta( $id, 'xfer_user_pass', true );
$table = $wpdb->prefix . 'users';
$wpdb->query( $wpdb->prepare(
"
UPDATE `" . $table . "`
SET `user_pass` = %s
WHERE `ID` = %d
",
$pass,
$id
) );
delete_user_meta( $id, 'xfer_user_pass' );
}
@Minsu5014
Copy link

Minsu5014 commented Jun 4, 2017

Hi,

Please see the pictures at the bottom.

I have tried this code. However, it didn't work,it keeps saying "The password you entered for the username 'xxx' is incorrect" I guess, my one are {userpass[1]} and userpass. Yours is 'user_pass'. Because of this difference.'_', does it not work? Could you give me a solution to?

Kind regards,

userpass
userpass2

@mbissett
Copy link

Hi @Minsu5014,

I know it's been a while, but if you haven't already, please open up a ticket for this at: http://www.wpallimport.com/support/ - that would be the place to discuss this issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment