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
- MySQL – UPDATE query with LIMIT
- How to fix the “508 Resource Limit is reached” error in WordPress?
- How do I display logged-in username IF logged-in?
- Remove more or […] text from short post
- Where can I find documentation on what characters are allowed in user names and why?
- Can I hook into user registration *before* a user is created?
- Filter username field on registration for profanity and unwanted words
- Decrease file size upload in Media
- Displaying Logged-In User Name in WordPress Menu
- Problem with Hebrew characters in username
- Customizing get_the_excerpt() to specific length and “Read More” output.
- Different number of posts in each category
- Allowing an email as the username?
- Why can’t I update username through WordPress API?
- How can I limit the number of comments per registered user per day?
- Ability to set character limit in BuddyPress?
- Limiting the number of users
- Set a maximum upload count for users on a specific user role
- How can i force Display names to be the same as Usernames?
- limit the words in the post content and add read more link
- How to limit user to publish post per day and per role?
- Change user’s display name programmatically
- Stop users from logging in from multiple locations
- Is there a limit on the size of a WP page?
- Hebrew username
- Email as Username in registration
- Restrict users from editing post based on the age of the post
- Set “Display name publicly as” to be usernames by default
- Limit number of pages that use a specific template?
- 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
- Pre-populate Username Field
- Images Missing from built in WP Gallery
- Menu Link Redirect Based on Username or User ID
- How to increase media image scale limit?
- How to override WordPress registration and insert an auto-generated username?
- add the user name to menu when user is logged in [closed]
- Limit the Excerpt field in WP-Admin in words
- One time username change from frontend?
- Limit the_excerpt with max of x characters
- Function to change a label (Username) in a core WordPress File (wp-includes/general-template.php)
- 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?
- Allowed memory size exhausted. WordPress side solution
- is there any limit of length on creating custom taxonomies?
- 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
- Username field is not shown in Woocommerce’s registration contact form
- How to limit get_posts()?
- 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
- How to set a minimum length for username in Woocommerce? [closed]
- Change default ordering of display name
- dynamically limit depth of wp_list_pages
- Showing the user’s username in registration email or activation page with BuddyPress [closed]
- Is there a limit on the number of attachments?
- Change Username?
- WP_Query posts_per_page ignored
- How to check username availability with ajax at registration
- How to limit WP_Query to one result on the loop?
- Get total posts found, but while using limit for pagination? get_posts
- Change username before login
- How to display user nickname (not display name) in PHP template?
- apply_filters/do_action tag characters limit
- limit characters when posting from form
- use of nickname and nicename?
- How to allow wordpress to create username with symbols like +
- WordPress Defined Memory Limit
- Limited number of paging to 10 “pages: 1 … 10”
- Limiting the number of posts in WP_Query leads to unexpected result
- Character Limit w/ Excerpt removes Images Why?
- Limit amout of sessions on user-by-user basis?
- How do I shorten the title lenghs with Elementor theme? [closed]
- Display first name of logged in user?
- How to limit post of custom post status?
- How to only show posts assigned to current user, only in certain post types
- Limit Number of Taxonomy Terms (Images) Displayed
- Limit posts per author role (excluding admin) in home page
- How to limit comment author to one comment per post
- Private page protected with username and password
- Restrict users post for himself
- Problem loading custom post type admin page
- Use mulitple usernames?
- Is it possible to incorporate username in a login redirect?
- register_post_type name character limit
- How do I display user name, role and site name using HTML tags inside a dashboard notification?
- How can i change the name order in the admin?
- Get latest 3 posts from multiple CPT in one query
- Limit the menu child levels under “admin > appearance > menus”