Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    User names are case insensitive, so even if you force FOO, foo will work to log in. You might be able to alter this behavior by changing your DB’s collation of the login_name column to one without “ci” (untested).

    To force uppercase on the form, use JavaScript to add an onchange listener that applies .toUpperCase() to the user name field. To prevent someone from disabling JavaScript and submitting a lowercase username, use the ‘registration_errors’ filter to verify if the name is all uppercase. If not, add an error to the passed WP_Error object to cause registration to be aborted.

Viewing 1 replies (of 1 total)

The topic ‘force uppercase letters for registration’ is closed to new replies.