Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
Disable certain characters in usernames
Resolved
Hello! So despite the very obvious warning I put on my registration page I still have users registering with special characters in their usernames, which makes it so that their profiles become unviewable and makes for some issues. Is there a way to disable it so that if they attempt to register with a special character in the username it won't register them, but instead gives the warning "Sorry, please only use letters, numbers, or spaces in your username."
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 02-18-2016 at 06:39 PM. |
#2
|
||||
|
||||
OK, so there's this chunk of code;
Code:
if($username == "SYSTEM"){ $this->seterror("Cannot use SYSTEM as username."); return FALSE; } Some folks use this sort of code; PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 02-18-2016 at 11:44 AM. |
#3
|
||||
|
||||
To check that usernames only have letters, numbers, and spaces, find the usernamevalidate() function in classes/class_registervalidator.php and replace the function with this:
PHP Code:
__________________
The calzones... betrayed me?
|
#4
|
||||
|
||||
Awesome, thank you!
Also- Pachooooo! <3
__________________
My Mods Site (1.3.4, 2020 Mods) |
|
|
What's New? |
What's Hot? |
What's Popular? |