From e9217eb95b2837ddab30a0bda0382d5a76edf0ef Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Thu, 24 Nov 2016 14:16:34 +0800 Subject: [PATCH] Fix change password validation --- core/um-actions-password.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/um-actions-password.php b/core/um-actions-password.php index cf5ccb8b..bdf9cec6 100644 --- a/core/um-actions-password.php +++ b/core/um-actions-password.php @@ -170,8 +170,8 @@ 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( ! is_user_logged_in() && isset( $args ) ){ - wp_die( __( 'This is not possible for security reasons.','ultimatemember') ); + if( ! is_user_logged_in() && isset( $args ) || is_user_logged_in() && isset( $args['user_id'] ) && $args['user_id'] != get_current_user_id() ){ + wp_die( __( 'This is not possible for security reasons.','ultimatemember') ); } if ( isset( $args['user_password'] ) && empty( $args['user_password'] ) ) {