The filter validate_username
sends and expects a boolean value, not a string.
Hook into sanitize_user
and use mb_strtolower()
.
Sample code, not tested:
add_filter( 'sanitize_user', 'wpse_83689_lower_case_user_name' );
function wpse_83689_lower_case_user_name( $name )
{
// might be turned off
if ( function_exists( 'mb_strtolower' ) )
return mb_strtolower( $name );
return strtolower( $name );
}
Related Posts:
- How to prevent certain usernames from being registered?
- White spaces in username give 404 on author page
- auto assign sequence base username while registration
- Is there a maximum length to user passwords?
- How to allow wordpress to create username with symbols like +
- Restrict certain character combinations in username during registration
- Create a unique username with validation on wordpress registration
- I have restricted the username to numerical format but not able to integrate the same with PeepSo plugin
- Limit username to specific characters (A-Z and 0-9)
- How can I be certain that a user has verified their email after registration?
- Placeholder text for registration form
- Use the user_activation_key for other purposes
- How to check if the user registration is allowed/active?
- how to disable user confirmation from administration?
- Custom registration form page/template
- Send automatic email to user after wp_create_user
- How to disable or protect against disposable email accounts?
- How to override WordPress registration and insert an auto-generated username?
- Registration key
- User defined password at registration – registration email sends auto generated pass
- How to reload the role specific registration form on validation errors?
- Advice on setting up a site with front end registration
- Restrict user registration to emails on a single domain
- Username field is not shown in Woocommerce’s registration contact form
- Payment on Registration?
- WordPress members-only page with link visible only to members
- How do I show errors after validation with a custom form frontend?
- Check if username exist with AJAX
- How can I find users that didn’t set a password?
- Send custom signup approval email to different Administrators selectively
- Registering without e-mail adress!
- Batch users creation
- After e-junkie payment, send a http post to register user automatically?
- Email confirmation in user registration form without a plugin
- How to bypass the username as a required field in registration and just use email address instead?
- Does the user_register change in multisite?
- Where are people registering on my website?
- How to disallow user to register with a specific word in the username?
- How to stop WordPress emailing a password
- Change User Registration
- Data sanitization for user registration and user login
- Adding register & login at top right corner
- Backend user creation form with additional language field
- Register users without confirmation
- Override default new user registration email with custom message (non sub-domain multi-site installation)
- Include “registration.php” for custom registration form?
- Regsitration form on External page
- can registration be enabled programatically?
- register user only with specific Host name
- Disable New User Registration Email sent to WordPress admin email on 4.9.5
- my custom css file downloads then it STOPS!
- Filter for users on custom post type
- Registration area + reserved area
- I want to add a tax-ID field in registration form and upon submission, perform a lookup by tax-ID
- Please suggest me some plugins in WordPress networking
- wordpress – user registration ( signup registration )
- Disable password limitations
- How to integrate CAPTCHA on register page? [closed]
- New register email notification sending some fields blank on site admin emai id
- Profile picture in registration form WordPress [closed]
- Register multiple users in one form
- Register through url
- loading custom registration template
- Add ‘first name’, ‘last name’, ‘date of birth’ and ‘terms and conditions’ to register fields?
- How to show password fields on registration form w/o plugins
- Is there any way to not require email address or disable notification upon setting up a member?
- I want to remove the http:// that is added automaticly on the user profile adress
- Why is wp_new_user_notification not working?
- How to add user registration and signup in WordPress and create members only page?
- Wikipedia – CMS
- Hook before user is created and make some custom validation
- remove (error:) from registration errors woocommerce
- Action Hook that fires function upon registration at Woocommerce checkout
- Redirection after registration
- My new website registration error
- Registration – website crashes, error 403
- I want to give every new registering user a unique key apart from password field for external use
- Is it possible to remove the password field in the registration page in woocommerce?
- Send a password to a user who has just registered for a member area
- How to auto-generate random numbers in username?
- The requested URL /wordpress/register/ was not found on this server
- Restrict certain roles registrations by domain
- Macros for WordPress, creating subdomains out of registrations for current domain
- How to make user to logged into website & redirect to homepage after successful registration?
- generate an auto incremented id number when a new user is registered
- Remove wp-login link from auto generated wordpress’s email
- Username from e-mail
- Multisite/Network What file to edit to change the “new blog” registration text
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- Reordering fields in registration form via custom plugin
- How do spam users register while I’ve only enabled registration by Gmail via Janrain?
- What hooks, actions or filters i can use to customize wordpress registration page and form?
- Can email address be used as user name?
- Website visible only to Registered users (non wp-admin)
- Plugin recommendation for directory site [closed]
- Fields in register page is pre-filled out with name and email
- Login to comment: not just user and email
- Group users by meta_value
- Change default error message “This email address is already in use” when registering a new user in WordPress using Caldera Forms
- Run custom validation only if all other wordpress registration form validation was successful