Wordpress Update User's Password with PHP

It worked for me to update 'user_pass' using both update_user_meta and wp_update_user:


update_user_meta($user_id, 'user_pass', $newpassword);
wp_update_user( array ('ID' => $user_id, 'user_pass' => $newpassword) ) ;

No comments:

Post a Comment