- fixed issue with visible ID. Changed it to the user_login. It's WordPress native logic for reset password links and form;

This commit is contained in:
Nikita Sinelnikov
2022-08-11 21:49:19 +03:00
parent 95a26c97bb
commit b98f2a6edf
5 changed files with 84 additions and 81 deletions
+11 -1
View File
@@ -1409,9 +1409,19 @@ if ( ! class_exists( 'um\core\User' ) ) {
/**
* Password changed email
*
* @param null|int $user_id
*/
function password_changed() {
function password_changed( $user_id = null ) {
if ( ! empty( $user_id ) ) {
um_fetch_user( $user_id );
}
UM()->mail()->send( um_user( 'user_email' ), 'changedpw_email' );
if ( ! empty( $user_id ) ) {
um_reset_user();
}
}