minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Bugs miniBB Community Forum / Bugs /

Edit profile (username problem)

 
Siavash
Forums Member
#1 | Posted: 22 Aug 2007 00:12
Reply 
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
Paul
CEO
#2 | Posted: 22 Aug 2007 04:00
Reply 
What do you mean by "they can not edit"? They get kind of error or something else?..
Siavash
Forums Member
#3 | Posted: 22 Aug 2007 17:35
Reply 
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.'
Anonymous
Guest
#4 | Posted: 22 Aug 2007 18:40
Reply 
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)?
Ivan
Advanced Member
#5 | Posted: 23 Aug 2007 03:08 | Edited by: Ivan
Reply 
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.
Paul
CEO
#6 | Posted: 23 Aug 2007 04:45 | Edited by: Paul
Reply 
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...
Siavash
Forums Member
#7 | Posted: 26 Aug 2007 18:50
Reply 
if it works I will put in changes list for the next release, thanks...
It works well
thanks Paul ;-)
Siavash
Forums Member
#8 | Posted: 3 Sep 2007 16:21
Reply 
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)
Paul
CEO
#9 | Posted: 4 Sep 2007 05:59
Reply 
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...)
 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


» 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, be sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 39
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®