• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Make = possible in hotel names.

Newbie Spellweaver
Joined
Nov 7, 2015
Messages
61
Reaction score
1
Hi RAGE,



I'd like to make it possible that you can register with a username that includes = or - or . in the name. But when I use those, it'll block the register cause it's a unvalid username. How can I make those valid, so that users can make a name like for example -test. ?
 
Newbie Spellweaver
Joined
Nov 7, 2015
Messages
61
Reaction score
1
I don't really know. For me it's just that users can use the = or - in their usernames.
 
Upvote 0
Newbie Spellweaver
Joined
Nov 7, 2015
Messages
61
Reaction score
1
I'm using revcms. ( some kind of pear edit, I made it exploit-less. I don't know exactly where it came from but it's revcms.)



Somebody?
 
Upvote 0
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
\app\class.users.php:25

Code:
if(!preg_match("/^([A-Za-z]){3,15}-([A-Za-z]){3,15}$/", $username))

EDIT: Thats my RP regex, use something like

Code:
/^([A-Za-z0-9=-=.-.]){3,15}$/
 
Upvote 0
Newbie Spellweaver
Joined
Nov 7, 2015
Messages
61
Reaction score
1
Thankyou @Keiz :)



Hmm, pretty sure that must be it. But how can I use this? There's no line for that.


Code:
final public function validName($username)         {        if(strlen($username) <= 25 && ctype_alnum($username))                  {                          return true;                  }                                    return false;         }


Do I need to delete the if <= 25 line? Or just paste the code under it.
 
Upvote 0
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
Code:
final public function validName($username)  
{
        return preg_match("/^([A-Za-z0-9=-=.-.]){3,15}$/", $username);
}
 
Upvote 0
Back
Top