Viewing 1 replies (of 1 total)
  • Plugin Author Nextendweb

    (@nextendweb)

    Hi @noblesoft,
    WordPress allows whitespaces in usernames, but I see your point. We will remove every whitespace in the next version.

    If you need instant solution:

    • Open wp-content/plugins/nextend-facebook-connect/includes/provider.php
    • Add this line to the right place: $username = preg_replace('/\s+/', '', $username);
    
        protected function register($providerID, $access_token, $email, $name = '', $first_name = '', $last_name = '') {
    
            $username = strtolower($first_name . $last_name);
            if (empty($username)) {
                $username = strtolower($name);
            }
    
            $username = preg_replace('/\s+/', '', $username);
    
            $sanitized_user_login = sanitize_user($this->settings->get('user_prefix') . $username, true);
            if (empty($username) || !validate_username($sanitized_user_login)) {
    
Viewing 1 replies (of 1 total)

The topic ‘Username has spaces’ is closed to new replies.