miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
How To miniBB Support Forums / How To /  
 

Limit username length to minimum 2 characters (also as the maximum)

 
Author Patrick
Guest
#1 | Posted: 9 Sep 2005 10:43 
Hi which file has the information on how many characters a username can have. Right now, i believe you need to have more than 3 letters i'd like to set this to 2 letters.

Author Team
8-)
#2 | Posted: 9 Sep 2005 10:44 
bb_func_checkusr.php

Change $userRegExp="#^[".$userRegName."]{3,40}\$#";

istead of "3" type "2".

Author michael1234
Partaker
#3 | Posted: 15 Aug 2006 19:28 
Any way to limit the amount of letters in a username?

Author Paul
Lead Developer 
#4 | Posted: 16 Aug 2006 08:03 
user_dataform.html - limit maxlength of the login field here.
bb_func_checkusr.php - limit {3,40} to {3,MAXLENGTH} here.

Author michael1234
Partaker
#5 | Posted: 18 Aug 2006 01:26 
Thank you Paul.

Author otto
Partaker
#6 | Posted: 2 Feb 2007 07:18 
Thank you Paul.

Author Paul
Lead Developer 
#7 | Posted: 2 Feb 2007 11:32 
My little addition - if you change the script above, it will be still a core-destructive solution.

However, it's more than simple to change "login" field's maxlength in templates/user_dataform.html for example, also as "user_usr" in templates/user_login_form.html. Of course an experienced "hacker" will be able to register longer username, if you don't change bb_func_checkusr.php. But for 95% of users it won't be an easy and even possible task ;-)

Author Prince
Partaker
#8 | Posted: 17 Jul 2012 16:04 
I think there is a bug for bb_func_checkusr!

I set this $umin=4; and $umax=14; but they still can register with 15 character, and also in dataform they still can enter 15 even $umax is 14.

I'm using new version.. any one got same issue or can help?

Author Prince
Partaker
#9 | Posted: 17 Jul 2012 16:15 
Ok found it.. it was in Index.. and made it to 14 now :)

Author Paul
Lead Developer 
#10 | Posted: 19 Jul 2012 18:33 
From the manual:

//$uname_minlength=3; non-mandatory option (not available by default). Non-destructively specifies the minimum username length upon registration.
//$uname_maxlength=40; non-mandatory option (not available by default). Non-destructively specifies the maximum username length upon registration.
You may try to add/unslash these settings in setup_options.php without destroying the most important core file.

Author Prince
Partaker
#11 | Posted: 19 Jul 2012 19:57 
Paul:
You may try to add/unslash these settings in setup_options.php without destroying the most important core file.
Thanks for that :)

How To miniBB Support Forums / How To /
 Limit username length to minimum 2 characters (also as the maximum)
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑