Password reset feature and code changes

This commit is contained in:
ultimatemember
2014-12-22 01:45:24 +02:00
parent de29624589
commit 5efc526986
24 changed files with 702 additions and 108 deletions
+20
View File
@@ -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
***/