mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 14:43:49 +09:00
Password reset feature and code changes
This commit is contained in:
@@ -207,6 +207,17 @@ class UM_User {
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Set user's hash for password reset
|
||||
***/
|
||||
function password_reset_hash(){
|
||||
global $ultimatemember;
|
||||
|
||||
$this->profile['reset_pass_hash'] = $ultimatemember->validation->generate(30);
|
||||
$this->update_usermeta_info('reset_pass_hash');
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Set user's hash
|
||||
***/
|
||||
@@ -222,6 +233,15 @@ class UM_User {
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @password reset email
|
||||
***/
|
||||
function password_reset(){
|
||||
global $ultimatemember;
|
||||
$this->password_reset_hash();
|
||||
$ultimatemember->mail->send( um_user('user_email'), 'resetpw_email' );
|
||||
}
|
||||
|
||||
/***
|
||||
*** @approves a user
|
||||
***/
|
||||
|
||||
Reference in New Issue
Block a user