mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Fix reset and change password
This commit is contained in:
@@ -113,9 +113,11 @@
|
||||
}
|
||||
$ultimatemember->account->current_tab = 'general';
|
||||
|
||||
$user = get_user_by('login', um_user('user_login') );
|
||||
// change password
|
||||
if ( $_POST['current_user_password'] != '' || $_POST['user_password'] != '' || $_POST['confirm_user_password'] != '') {
|
||||
if ( $_POST['current_user_password'] == '' || !wp_check_password( $_POST['current_user_password'], um_user('user_pass'), um_user('ID') ) ) {
|
||||
if ( $_POST['current_user_password'] == '' || ! wp_check_password( $_POST['current_user_password'], $user->data->user_pass, $user->data->ID ) ) {
|
||||
|
||||
$ultimatemember->form->add_error('current_user_password', __('This is not your password','ultimatemember') );
|
||||
$ultimatemember->account->current_tab = 'password';
|
||||
} else { // correct password
|
||||
|
||||
Reference in New Issue
Block a user