miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Re-cycled miniBB Support Forums / Re-cycled /  
 

Users can't use numbers in login names?

 
Author andreasm
Partaker
#1 | Posted: 11 Nov 2008 07:54 
My users can't use numbers in their login names.

Although it is allowed in file setup_options.php
$userRegName='_A-Za-z0-9äöüß ';

using miniBB 2.2b

What's wrong here?

Author Paul
Lead Developer 
#2 | Posted: 12 Nov 2008 03:32 
So far I suppose, in the newest version usernames can't consist of the numbers only (to avoid conflict between username and user ID in some add-ons, for example, Private Messaging), but still, numbers may be used, you can try on minibb demo.

Author andreasm
Partaker
#3 | Posted: 12 Nov 2008 05:29 
I just tried your minibb demo with username "elo22".

It doesn't work.

Message:
"Error in user data: Password is allowed to contain only latin letters (a-z and A-Z), numbers (0-0) and underscores, it must be between 5 and 30 characters in length."


----

I remember that using numbers worked in past, because I have some users with numbers in their name in my database. So there must be made any change in forums code. But where?

Author Paul
Lead Developer 
#4 | Posted: 12 Nov 2008 09:00 
So your mistake is not in the username, but in the password. Do you see what's written? Error in user data: Password... I have registered 'elo22' successfully and have made a post from this account.

Author andreasm
Partaker
#5 | Posted: 12 Nov 2008 10:03 
Oh sorry, my mistake. Now it works in demo forums. But not in mine.... I can't remember that I made any changes to forums code for registration.

Which files should I check?

Author Paul
Lead Developer 
#6 | Posted: 12 Nov 2008 11:11 
You should check your password first ;-) Then the option under setup_options.php (which seems correct for you) and bb_func_checkusr.php file.

Author andreasm
Partaker
#7 | Posted: 17 Nov 2008 12:03 
Thanks, there was an old version of bb_func_checkusr.php on server. I updated it and now it works!

Author marsbar
Associated Member
#8 | Posted: 9 May 2020 08:48 
G'day, Paul.

Hope you can help me with this latest issue ...

A site visitor to my miniBB Forums has reported that he could not register his preferred username (e.g. 123greetings), and the error was "Username can contain only letters (a to z) and numbers. Please keep your username short."

Usernames containing numbers (either as prefix or suffix: 123abcd or abcd123) were never an issue before; the only recent change to the forums is the upgrade to v3.4.2.

Username related config:
$userRegName='_A-Za-z0-9 ';
$disallowNames and $disallowNamesIndex both have some not family-friendly terms specified, but no numbers.

Any advice you are happy to offer will be gratefully received.

With thanks,
marsbar

Author Paul
Lead Developer 
#9 | Posted: 12 May 2020 13:19 
marsbar
Most likely, this is coming from the function `verifyUsername`, which is in bb_func_checkusr.php.

Usernames could be about "abcd123", but they could not be about "123abcd", and they could not consist of numbers only. This is most likely is your issue, and this is a security issue.

Despite you could non-destructively re-define this function, for example, putting in bb_specials.php and removing the code line, which is commented as "should be sensful alphanumerical", my recommendation is to leave it as it is. Usernames truly should be "sensful", and allowing them to start with a number or consist of numbers only, you could open a door to quite unwanted actions in some add-ons like Private Messaging.

Author marsbar
Associated Member
#10 | Posted: 16 May 2020 10:12 
Hi, Paul! Thanks for your reply.

Paul:
Most likely, this is coming from the function `verifyUsername`, which is in bb_func_checkusr.php. Usernames could be about "abcd123", but they could not be about "123abcd", and they could not consist of numbers only.
Just confirming that I have understood you correctly; are you saying miniBB's default verifyUsername function is:
- disallow names that contain only numbers
- disallow numbers before letters?

If the above is true, then something odd is going on, because ...
a) I have always used the default bb_func_checkusr.php,
b) I have users with usernames that begin with numbers! Those names were registered years ago. I do not know exactly from when the ability to do register names that starts with numbers stopped. :(

Has the verifyUsername function changed over the years, Paul? Do you advise I replace my copy?

With thanks,
marsbar

Author Paul
Lead Developer 
#11 | Posted: 18 May 2020 21:45 
marsbar:
Just confirming that I have understood you correctly; are you saying miniBB's default verifyUsername function is:
- disallow names that contain only numbers
- disallow numbers before letters?
Yes, the newest default miniBB function is about that.

marsbar:
I have users with usernames that begin with numbers! Those names were registered years ago.
You have older usernames begin with numbers, because earlier miniBB function didn't have that protection.

marsbar:
Has the verifyUsername function changed over the years, Paul? Do you advise I replace my copy?
Yes, verifyUsername function changed. You could still keep your older copy, or you could re-define this function with your own conditions, as I've described above. As I've mentioned, numbers in username could be a conflict when using PM add-on; also for some other cases. If you don't use this add-on, you could try to keep starting numbers, or total numbers in username allowed.

Author marsbar
Associated Member
#12 | Posted: 24 May 2020 07:57 
Paul:
Yes, verifyUsername function changed.
A-ha! That explains why, once upon a time, users were able to register names that began with number(s). I'll stick with the new default, and just update the standard error message to make this new restriction clear to users.

Thanks, Paul, for your help with this!

Best wishes from Australia,
marsbar

Author Paul
Lead Developer 
#13 | Posted: 24 May 2020 16:36 
marsbar:
just update the standard error message to make this new restriction clear to users.
It's actually a good reminder for me, too; I'll extend the error message in the next release as well. Thanks for keeping an eye on this!

Re-cycled miniBB Support Forums / Re-cycled /
 Users can't use numbers in login names?
 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
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑