Add-on Disable Caps Lock Over Sign Up/Register

ŽivaAkcija

Well-known member
Regarding of quoted post, anyone to resolve or develop plugin.

Hmm. My mistake. I referred you to this thread. But now I see in the code that the username regex uses an "i" flag which makes it case-insensitive:

library/XenForo/DataWriter/User.php

Removing the i would allow the regex to be case-sensitive, but that requires a file edit or addon.

Rich (BB code):
            $matchRegex = $this->getOption(self::OPTION_USERNAME_REGEX);
            if ($matchRegex)
            {
                $matchRegex = str_replace('#', '\\#', $matchRegex); // escape delim only
                if (!preg_match('#' . $matchRegex . '#i', $username))
                {
                    $this->error(new XenForo_Phrase('please_enter_another_name_required_format'), 'username');
                    return false;
                }
            }
 
Top Bottom