miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Premoderation addon for miniBB Worried about forum enemies? Pre-approve postings and members with the Premoderation add-on!
Bugs miniBB Community Forum / Bugs /
Short link for this topic:

Edit profile (username problem)

Author Danny2000
Forums Member
#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
CEO
#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
Forums Member
#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 | Edited by: Ivan
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
CEO
#6 | Posted: 23 Aug 2007 04:45 | Edited by: Paul
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
Forums Member
#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
Forums Member
#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
CEO
#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 Community Forum / Bugs / Edit profile (username problem) Top
Your Reply Click this icon to move up to the quoted message

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
miniBB Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts