mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 07:04:06 +09:00
Fixed password changed email template
This commit is contained in:
@@ -34,14 +34,16 @@
|
||||
add_action('um_change_password_process_hook','um_change_password_process_hook');
|
||||
function um_change_password_process_hook( $args ) {
|
||||
global $ultimatemember;
|
||||
extract( $args );
|
||||
|
||||
wp_set_password( $args['user_password'], $args['user_id'] );
|
||||
|
||||
delete_user_meta( $args['user_id'], 'reset_pass_hash');
|
||||
delete_user_meta( $args['user_id'], 'reset_pass_hash_token');
|
||||
|
||||
|
||||
do_action('um_after_changing_user_password', $args['user_id'] );
|
||||
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
wp_logout();
|
||||
}
|
||||
@@ -50,17 +52,31 @@
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides password changed notification
|
||||
*
|
||||
*/
|
||||
function um_send_password_change_email( $args ){
|
||||
|
||||
global $ultimatemember;
|
||||
|
||||
um_fetch_user( $user_id );
|
||||
|
||||
$ultimatemember->user->password_changed();
|
||||
|
||||
um_reset_user();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @This is executed after changing password
|
||||
***/
|
||||
add_action('um_after_changing_user_password','um_after_changing_user_password');
|
||||
function um_after_changing_user_password( $user_id ) {
|
||||
global $ultimatemember;
|
||||
um_fetch_user( $user_id );
|
||||
|
||||
$ultimatemember->mail->send( um_user('user_email'), 'changedpw_email' );
|
||||
|
||||
um_reset_user();
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
Reference in New Issue
Block a user