You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ));
163
163
164
164
if ( !$update && username_exists( $user->user_login ) )
165
165
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ));
$errors->add('empty_username', __('<strong>ERROR</strong>: Please enter a username.'));
280
-
elseif ( !validate_username( $user_login ) ) {
281
-
$errors->add('invalid_username', __('<strong>ERROR</strong>: This username is invalid. Please enter a valid username.'));
282
-
$user_login = '';
283
-
} elseif ( username_exists( $user_login ) )
284
-
$errors->add('username_exists', __('<strong>ERROR</strong>: This username is already registered, please choose another one.'));
278
+
if ( $sanitized_user_login == '' ) {
279
+
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
280
+
} elseif ( ! validate_username( $user_login ) ) {
281
+
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
0 commit comments