From d948b855e08c5dbe31e1dcb7e3fb808326227044 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Fri, 9 Sep 2016 20:31:16 +0800 Subject: [PATCH] Fixes a bug to allow users change their password in account --- core/um-actions-password.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/um-actions-password.php b/core/um-actions-password.php index b34fb457..6e131ba2 100644 --- a/core/um-actions-password.php +++ b/core/um-actions-password.php @@ -158,10 +158,12 @@ if ( $form_timestamp == '' && um_get_option('enable_timebot') == 1 ) wp_die( __('Hello, spam bot!') ); - if ( $live_timestamp - $form_timestamp < 3 && um_get_option('enable_timebot') == 1 ) + if ( $live_timestamp - $form_timestamp < 3 && um_get_option('enable_timebot') == 1 ){ wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!') ); + } + - if ( isset( $args['user_password'] ) && ! empty( $args['user_password'] ) ) { + if ( isset( $args['user_password'] ) && empty( $args['user_password'] ) ) { $ultimatemember->form->add_error('user_password', __('You must enter a new password','ultimatemember') ); } @@ -181,7 +183,7 @@ } - if ( isset( $args['confirm_user_password'] ) && ! empty( $args['confirm_user_password'] ) ) { + if ( isset( $args['confirm_user_password'] ) && empty( $args['confirm_user_password'] ) ) { $ultimatemember->form->add_error('confirm_user_password', __('You must confirm your new password','ultimatemember') ); }