• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Modern aac - change name

xubeiga

New Member
Joined
Jun 17, 2009
Messages
137
Reaction score
1
hey people its me again >.<
i'm using modern aac and u can change your name to "player" yeah, without a capital letter.
it has to be Player not player...
any ideas on how to fix?
 
Go to system/libraries/form_validation.php

Find this:

PHP:
function nickname($str)  
        {  
                $a = explode(' ', $str);  
                $error = 0;  
                foreach($a as $b)  
                        if(!preg_match("/^[a-zA-Z]{3}+(([\'\-][a-zA-Z]{2})?[a-zA-Z]*)*$/", $b))  
                                $error++;  
                                  
                return $error ? FALSE : TRUE;  
        }

There you can edit whatever you want related with the disallowed characters, etc.
 
Try
PHP:
preg_match("^[A-Z]{1}+[a-z]{2}+(([\'\-][a-zA-Z]{2})?[a-z]*)*$", $b)
 
I tested it on RegExr and it only allows those names:
Summ
Summ'Lee
Summ'lee
Summblabla

wont allow:
suMM
summ
Su
Sum-l
 
Default preg_match seems to be just fine, at least for me. :p

Summ's edited one should work aswell.
 
Back
Top