mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- make WP native password reset;
- fixed password reset;
This commit is contained in:
@@ -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'] ) );
|
||||
|
||||
Reference in New Issue
Block a user