diff --git a/includes/admin/core/class-admin-builder.php b/includes/admin/core/class-admin-builder.php index 73cdf064..265771e4 100644 --- a/includes/admin/core/class-admin-builder.php +++ b/includes/admin/core/class-admin-builder.php @@ -915,11 +915,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {

- - - - + if ( 'row' !== $arg1 ) { + ?> + + + + + diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index ccab2037..69efa860 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -2530,7 +2530,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { $output .= ''; - if ( 'login' !== $this->set_mode && isset( $data['force_confirm_pass'] ) && 1 === $data['force_confirm_pass'] ) { + if ( 'login' !== $this->set_mode && ! empty( $data['force_confirm_pass'] ) ) { $key = 'confirm_' . $original_key; $output .= '
get_atts( $key, $classes, $conditional, $data ) . '>'; diff --git a/includes/core/um-actions-form.php b/includes/core/um-actions-form.php index e8eea188..25c2a3e2 100644 --- a/includes/core/um-actions-form.php +++ b/includes/core/um-actions-form.php @@ -633,18 +633,22 @@ function um_submit_form_errors_hook_( $args ) { } } - if ( isset( $array['force_confirm_pass'] ) && $array['force_confirm_pass'] == 1 ) { - if ( $args[ 'confirm_' . $key ] == '' && ! UM()->form()->has_error( $key ) ) { - UM()->form()->add_error( 'confirm_' . $key , __( 'Please confirm your password', 'ultimate-member' ) ); - } - if ( $args[ 'confirm_' . $key ] != $args[$key] && !UM()->form()->has_error( $key ) ) { - UM()->form()->add_error( 'confirm_' . $key , __( 'Your passwords do not match', 'ultimate-member' ) ); + if ( ! empty( $array['force_confirm_pass'] ) ) { + if ( ! array_key_exists( 'confirm_' . $key, $args ) && ! UM()->form()->has_error( $key ) ) { + UM()->form()->add_error( 'confirm_' . $key, __( 'Please confirm your password', 'ultimate-member' ) ); + } else { + if ( '' === $args[ 'confirm_' . $key ] && ! UM()->form()->has_error( $key ) ) { + UM()->form()->add_error( 'confirm_' . $key, __( 'Please confirm your password', 'ultimate-member' ) ); + } + if ( $args[ 'confirm_' . $key ] !== $args[ $key ] && ! UM()->form()->has_error( $key ) ) { + UM()->form()->add_error( 'confirm_' . $key, __( 'Your passwords do not match', 'ultimate-member' ) ); + } } } if ( isset( $array['min_selections'] ) && $array['min_selections'] > 0 ) { if ( ( ! isset( $args[ $key ] ) ) || ( isset( $args[ $key ] ) && is_array( $args[ $key ] ) && count( $args[ $key ] ) < $array['min_selections'] ) ) { - UM()->form()->add_error($key, sprintf( __( 'Please select at least %s choices', 'ultimate-member' ), $array['min_selections'] ) ); + UM()->form()->add_error( $key, sprintf( __( 'Please select at least %s choices', 'ultimate-member' ), $array['min_selections'] ) ); } }