Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Programmer095/2e26ff65a20c88b80c08e37783d38da2 to your computer and use it in GitHub Desktop.
Save Programmer095/2e26ff65a20c88b80c08e37783d38da2 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' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment