You can filter 'wpmu_validate_user_signup'
and check if the error code matches the 4 character warning. Then just unset the error code.
Sample plugin:
<?php # -*- coding: utf-8 -*-
/* Plugin Name: Allow short user names for multi site. */
add_filter( 'wpmu_validate_user_signup', 'wpse_59760_short_user_names' );
/**
* Allow very short user names.
*
* @wp-hook wpmu_validate_user_signup
* @param array $result
* @return array
*/
function wpse_59760_short_user_names( $result )
{
$error_name = $result[ 'errors' ]->get_error_message( 'user_name' );
if ( empty ( $error_name )
or $error_name !== __( 'Username must be at least 4 characters.' )
)
{
return $result;
}
unset ( $result[ 'errors' ]->errors[ 'user_name' ] );
return $result;
}
Related Posts:
- WordPress User Name Limitations
- Elasticsearch: Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
- How to limit the max number of characteres in the title that are displayed
- Is there a maximum limit of the number of users returns by WP_User_Query?
- Limit username to specific characters (A-Z and 0-9)
- Repository size limits for GitHub.com
- Can I hook into user registration *before* a user is created?
- Decrease file size upload in Media
- Problem with Hebrew characters in username
- Different number of posts in each category
- Allowing an email as the username?
- How can I limit the number of comments per registered user per day?
- Ability to set character limit in BuddyPress?
- How can i force Display names to be the same as Usernames?
- Change user’s display name programmatically
- Is there a limit on the size of a WP page?
- Hebrew username
- Email as Username in registration
- Set “Display name publicly as” to be usernames by default
- Limit the_excerpt in the first point (.) of the sentence
- How to prevent certain usernames from being registered?
- Restrict access to post if it is currently being edited
- Menu Link Redirect Based on Username or User ID
- Limit the Excerpt field in WP-Admin in words
- One time username change from frontend?
- How to get max upload size and accepted file types on multisite?
- How to translate “ERROR: Invalid username. Lost your password?”
- How to change a username?
- Register email as username
- How do I display the commentor’s first name and last name in the comments?
- Update user_login to change username
- White spaces in username give 404 on author page
- Limit the number of pages created by the paging
- Comments view limited to 20 results – any way to increase to 50 or 100?
- auto assign sequence base username while registration
- Change default ordering of display name
- Showing the user’s username in registration email or activation page with BuddyPress [closed]
- WP_Query posts_per_page ignored
- How to check username availability with ajax at registration
- Get total posts found, but while using limit for pagination? get_posts
- Change username before login
- limit characters when posting from form
- How to allow wordpress to create username with symbols like +
- Limited number of paging to 10 “pages: 1 … 10”
- Character Limit w/ Excerpt removes Images Why?
- Private page protected with username and password
- Restrict users post for himself
- Use mulitple usernames?
- How do I display user name, role and site name using HTML tags inside a dashboard notification?
- Limit the menu child levels under “admin > appearance > menus”
- how to remotely check a username / password from within a plugin
- Limit tag selection to predefined list
- Adding character count and limit in comments, modifying labels and fields – jetpack
- Problem with the Loop – want to limit the access to three free articles
- Unique User for all visitor, but possibility to comment with unique name
- HTTP Error after finishing uploading a video that is bigger than 64 MB -> After raising the upload limit manually in the wp-config file
- php function to display commenter username or login
- Calling User Nickname
- return only the first two terms of custom post
- Show ellipsis (…) only if the number of characters exceeds limit defined in substr
- Can anything go wrong if I let users change their usernames?
- Is it possible to rebuild the website while not accesseing the original database?
- Invalidate username if it contains @ symbol
- Change user nicename without sanitize
- How to show my wordpress admin username & password?
- Limit wp_nav_menu_objects() only to first-level menu items
- How can I apply custom sanitization to new usernames?
- Custom Post Limit for homepage only without plugin?
- Custom User Registration script only allowing usernames with 16 characters
- I want to change my user name
- How can I set a maximum allowed post size and number of posts submitted?
- How to limit post (Exception pages) for current user in each role in front end?
- How to add @ symbol to user url
- Limit the number of external API calls per second
- Allow a specific user role I have created to only upload one image to his media library
- how to split and upload a theme on wordpress?
- How to increase media image scale limit?
- How to limit the number of custom posts certain users can publish in WordPress using php script?
- Make WordPress User Name be the Company Name when Registering (not the default ‘first name’ last name’ email address’)
- How to change default username field after login
- Create a unique username with validation on wordpress registration
- How can i limit the number of posts to the most recent 6 in my query?
- WPAdverts – How to limit form submission 10 per month
- How to auto-generate random numbers in username?
- Author name length character limit?
- Excerpt being limited too early
- How to set an array of current usernames
- Is there a way to limit multi upload in media upload box?
- Limit attachment caption characters
- How to get to the date of the uploaded file
- forgot password
- Limit Search Queries per IP per Day
- Username has been exposed
- How can hackers access WP usernames? [duplicate]
- Image limit from 1 to 5
- Set the limit to allow author when make post!
- Limit access to a page
- Can’t upload files 1MB+ [closed]
- Latest post on specific category and custom css
- How To Change Username Slug