miniBB ® 

miniBB

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

Edit profile (username problem)

 
Author Danny2000
Partaker
#1 | Posted: 22 Aug 2007 00:12 
Actually this is not a bug, but I think it can be a small problem
In past, I'd set $userRegName='_A-Za-z0-9 '; now I change it to $userRegName='_A-Za-z0-9'; (remove space).
now my current users with space in their usernames can not edit their profiles.
how can I fix this, I don't want to chane $userRegName

Author Paul
Lead Developer 
#2 | Posted: 22 Aug 2007 04:00 
What do you mean by "they can not edit"? They get kind of error or something else?..

Author Danny2000
Partaker
#3 | Posted: 22 Aug 2007 17:35 
The error is:
'Usernames can contain only allowed symbols - by default, latin letters (a-z and A-Z), numbers (0-9), and underscores. Usernames must also be between 3 and 40 characters in length.'

Author Anonymous
Guest
#4 | Posted: 22 Aug 2007 18:40 
Hes saying he took the space out of $userRegName='_A-Za-z0-9 '; and now his previous registered users that had a space in thier username can't edit their profiles. Can you go through all the members with a space and insert an underscore as admin (changing their username)?

Author Ivan
Advanced Member
#5 | Posted: 23 Aug 2007 03:08 
It's not a bug, I think, but obviously there is a functuon to check the user's name regarding the allowed symbols when entering the user's profile. Possibly, while writing the code the thought has been only in a direction of adding symbols later, but not of removing some of them after that :)

May be in that and similar cases (after the initial registration) this finction could be removed, because the administrator might change the allowed characters more than once and a mess with the previous names to happen again. Finally, the name IS checked AT the registration, that's enough.

Author Paul
Lead Developer 
#6 | Posted: 23 Aug 2007 04:45 
Ok it seems I understand what the problem is. Yes we could call it a little bug, because actually upon updating the profile the username can not be updated therefore it should not be checked for a validity like it happens now.

Try this fix: edit bb_func_checkusr.php and change the line:

if (!preg_match($userRegExp,${$dbUserSheme['username'][1]})) $correct=1;

pasting the condition

if ($action=='register' and !preg_match($userRegExp,${$dbUserSheme['username'][1]})) $correct=1;

if it works I will put in changes list for the next release, thanks...

Author Danny2000
Partaker
#7 | Posted: 26 Aug 2007 18:50 
if it works I will put in changes list for the next release, thanks...
It works well
thanks Paul ;-)

Author Danny2000
Partaker
#8 | Posted: 3 Sep 2007 16:21 
Paul
how can I force new users to choose a username start with a character, I mean I don't want someone register with a numeric username (such as 878 or 354544)

Author Paul
Lead Developer 
#9 | Posted: 4 Sep 2007 05:59 
Try to edit bb_func_checkusr.php

and where it says

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

change it to

$userRegExp="#^[a-zA-Z]+[".$userRegName."]{3,40}\$#";

(not tested though...)

Bugs miniBB Support Forums / Bugs /
 Edit profile (username problem)
 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑