Created
April 9, 2017 13:05
-
-
Save omniacode/af9ae5fc7a140f222140eab4e2b90d60 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 ); | |
$wpdb->query( $wpdb->prepare( | |
" | |
UPDATE `wp_users` | |
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