Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Nuke Platinum
Author Message
naughtydog
New Member
New Member



Joined: Apr 17, 2006
Posts: 2

PostPosted: Mon Apr 17, 2006 6:01 pm Reply with quote

Is there any way to make it so that when someone registers with my site they can use charters like {This} or [This] using the brackets?

I found this in the functions.php is there any way to change this so the {} [] brackets will be useable in a user name?

Code:
function ya_userCheck($username) {

    global $stop, $user_prefix, $db, $ya_config;
    // Need to find a way to include extended caracters
    //if ((!$username) || ($username=="") || (ereg("[^À-ÿa-zA-Z0-9_-]",$username))) $stop = "<center>"._ERRORINVNICK."</center><br>";
    if ((!$username) || ($username=="") || (ereg("[^a-zA-Z0-9_-]",$username))) $stop = "<center>"._ERRORINVNICK."</center><br>";


For example if I try to register the name {MY}Name I get this error:

Registration Error!
ERROR: Invalid Nickname

If I remove the line

Code:
if ((!$username) || ($username=="") || (ereg("[^a-zA-Z0-9_-}-{-[-]-]",$username))) $stop = "<center>"._ERRORINVNICK."</center><br>";


Will it let me use the {} () [] in a user name?

If not is there any way to let users use the {}()[] brackets in there name?

I am using PHP-Nuke-Platinum-7.6.0 with CNB Your Account 4.4.0 b2

Thanks
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Apr 17, 2006 6:51 pm Reply with quote

In the code like
Code:


"[^À-ÿa-zA-Z0-9_-]"

You want to add the characters you want to use between the brackets. Note the actual bracket character needs to be escaped to use \[\]


Removing that line is not recommending, it may allow people to abuse it

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
naughtydog







PostPosted: Mon Apr 17, 2006 7:04 pm Reply with quote

WoW thanks for the Quick reply

ok i used

Code:
"[^a-zA-Z0-9_-\\[\\]\\{\\}\\=-]"


And it worked fine thanks for your help Very Happy
 
bigbillmrbill
New Member
New Member



Joined: Mar 09, 2007
Posts: 12
Location: Chicago,IL

PostPosted: Wed Mar 21, 2007 8:25 am Reply with quote

what file is that under i been looking for a fix for my site with people makeing names
 
View user's profile Send private message Visit poster's website MSN Messenger
evaders99







PostPosted: Wed Mar 21, 2007 2:22 pm Reply with quote

modules/Your_Account/index.php
 
bigbillmrbill







PostPosted: Wed Mar 21, 2007 2:26 pm Reply with quote

thank you so much that been a big help
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Nuke Platinum

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©