mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed using special chars inside the password;
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user