- fixed updating display_name if there is set the User Display Name setting to Default WP Display Name in UM > General > Users > Display name;

- fixed typo in the password validation
This commit is contained in:
Nikita Sinelnikov
2021-09-21 18:26:57 +03:00
parent 7aa8efefff
commit fc92903f97
6 changed files with 104 additions and 10 deletions
+2 -2
View File
@@ -549,11 +549,11 @@ if ( ! class_exists( 'um\core\Password' ) ) {
$max_length = ! empty( $max_length ) ? $max_length : 30;
if ( mb_strlen( $args['user_password'] ) < $min_length ) {
UM()->form()->add_error( 'user_password', __( 'Your password must contain at least 8 characters', 'ultimate-member' ) );
UM()->form()->add_error( 'user_password', sprintf( __( 'Your password must contain at least %d characters', 'ultimate-member' ), $min_length ) );
}
if ( mb_strlen( $args['user_password'] ) > $max_length ) {
UM()->form()->add_error( 'user_password', __( 'Your password must contain less than 30 characters', 'ultimate-member' ) );
UM()->form()->add_error( 'user_password', sprintf( __( 'Your password must contain less than %d characters', 'ultimate-member' ), $max_length ) );
}
if ( ! UM()->validation()->strong_pass( $args['user_password'] ) ) {