Forked from louisreingold/gist:1ef75e6b3623c5c66e4443dc762bfd52
Created
September 4, 2017 16:44
-
-
Save Programmer095/2e26ff65a20c88b80c08e37783d38da2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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