miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

How to modify / change a USERNAME in forums?

 
Author Nathan
Guest
#1 | Posted: 13 Feb 2004 02:43 
Is there a way to change usernames?

Author Nathan
Guest
#2 | Posted: 13 Feb 2004 02:44 
or maybe I could make the login case-insensitive?

Author fruitfly
Partaker
#3 | Posted: 13 Feb 2004 03:24 
I don't know about making it case sensitive, but if you want to change a username, just get into your database and change that field in the minibb_users thingy. It won't update previous posts, but will change the username

Author Nathan
Guest
#4 | Posted: 13 Feb 2004 06:58 
Thanks for the guick reply.

Author Team
8-)
#5 | Posted: 13 Feb 2004 10:08 
Just changing the database is not the best trick... Still, old username will be kept in posts table, so probably you will need to change it too.

Author Anonymous
Guest
#6 | Posted: 14 Oct 2004 22:40 
Out of curiosity, why is the username duplicated in the posts table? Since poster_id is already in there, you can just join the posts and users tables based on the poster_id.

Also, the case-sensitive logins are a little bit inconvenient sometimes... I ended up hacking my forum to make it case insensitive.

Sorry if I sound like I'm complaining a bunch. Really I'm quite impressed with MiniBB. It's very cool. :)

Author Team
8-)
#7 | Posted: 15 Oct 2004 10:25 
Out of curiosity, why is the username duplicated in the posts table?

1) Because of the speed. Joining tables is much-much slower than simple selects, specially on large databases.
2) If you delete a user, his nickname is saved in each posts. So, you can remove the user saving his posts.

Also, the case-sensitive logins are a little bit inconvenient sometimes

It will be fixed in 2.0.

Author Pascal
Partaker
#8 | Posted: 29 Jul 2006 08:49 
Hi folks,

What sql queries do I have to execute in order to change the username of a member ? New username should appear in all his/her messages on the forum.

I assume I have to run a query in minibbtable_posts, minibbtable_topics and minibbtable_users.

Regards,
P.

Author Paul
Lead Developer 
#9 | Posted: 29 Jul 2006 14:26 
I think, something like...

update minibbtable_users set username='NEW_USERNAME' where user_id='USER_ID';

update minibbtable_topics set topic_poster_name='NEW_USERNAME' where topic_poster='USER_ID';

update minibbtable_topics set topic_last_poster='NEW_USERNAME' where topic_last_poster='OLD_USERNAME';

update minibbtable_posts set poster_name='NEW_USERNAME' where poster_id='USER_ID';
Substitute 'NEW_USERNAME' for the new username you want to appear, and 'OLD_USERNAME' for the current name. You must know 'USER_ID' in advance. Hope you know how to do it :-) [roll over cursor on "Member" title and you'll see something like ....action=userinfo&user=USER_ID ]

I think, if you'd have private messages add-on, it's much difficult to change username in it's storage files... a special script is needed for changing usernames. But on another side, it's not really necessary it to do it for some kind of "mailing" program... It's kind a separate script.

Author daniel gerzo
Guest
#10 | Posted: 29 Jul 2006 16:41 
Hello, just a thought:

as we store user_id in every table it is needed, why we don't store username only in minibbtable_users? then it would require only updating one table and queries in our code would use left join statements?

Author Pascal
Partaker
#11 | Posted: 29 Jul 2006 18:51 
Paul,

Thanks.

Author Paul
Lead Developer 
#12 | Posted: 31 Jul 2006 08:06 
daniel gerzo
left join statements - :-) well, they will kill your server fast, when you have a large amount of visitors. If you study miniBB code, you will see there is only one function using JOIN statement (just because there is no other way to get the data other than that), and this function is from admin panel (not often usage).

Author Vishal P. Rao
Guest
#13 | Posted: 20 Jul 2008 23:03 
Paul:
update minibbtable_topics set topic_poster_name='NEW_USERNAME' where topic_poster='USER_ID';
I think we also need to change topic_last_poster?

Author Paul
Lead Developer 
#14 | Posted: 24 Jul 2008 03:45 
Vishal P. Rao
That's correct, I've fixed the code above. Thanks!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 How to modify / change a USERNAME in forums?
 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.


  ⇑