- fixed using special chars inside the password;

This commit is contained in:
Nikita Sinelnikov
2022-06-10 01:53:35 +03:00
parent 03af2b3c0c
commit fa9b85773e
4 changed files with 41 additions and 15 deletions
+8
View File
@@ -272,6 +272,14 @@ function um_check_user_status( $user_id, $args ) {
add_action( 'um_registration_complete', 'um_check_user_status', 100, 2 );
function um_submit_form_errors_hook__registration( $args ) {
// Check for "\" in password.
if ( false !== strpos( wp_unslash( trim( $args['user_password'] ) ), '\\' ) ) {
UM()->form()->add_error( 'user_password', __( 'Passwords may not contain the character "\\".', 'ultimate-member' ) );
}
}
add_action( 'um_submit_form_errors_hook__registration', 'um_submit_form_errors_hook__registration', 10, 1 );
/**
* Registration form submit handler
*