Blocking "ß" letter on register

jadexxz

Member
May 23, 2020
34
1
Hello guys, anybody can use the "ß" letter to register, and when a person uses this letter on his name, a moderator cannot ban him with :ban x or mute him with :mute x, always moderator should use mod tools for it, and to ban from mod tools takes time. How can I disable the "ß" letter from register?
 

BIOS

ಠ‿ಠ
Apr 25, 2012
906
247
Enes Batur CMS
You can use ctype_alnum() PHP function if you only want to allow alphanumeric usernames (i.e. characters A-Z, and 0-9). Otherwise could use a regex.

Can you post the register code for the CMS? So I can get an idea of how it works.

You'd basically want something like this:
PHP:
if(!ctype_alnum($username)) {
    // error here
}

..

Proceed to register the user
 

Users who are viewing this thread

Top