- make WP native password reset;

- fixed password reset;
This commit is contained in:
nikitozzzzzzz
2018-09-16 00:26:32 +03:00
parent da74fa7000
commit 461cad6559
11 changed files with 622 additions and 671 deletions
+6
View File
@@ -149,8 +149,14 @@ function um_submit_account_details( $args ) {
$args['user_id'] = um_user('ID');
UM()->user()->password_changed();
do_action( 'send_password_change_email', $args );
//clear all sessions with old passwords
$user = WP_Session_Tokens::get_instance( um_user( 'ID' ) );
$user->destroy_all();
wp_set_password( $changes['user_pass'], um_user( 'ID' ) );
wp_signon( array( 'user_login' => um_user( 'user_login' ), 'user_password' => $changes['user_pass'] ) );