MyBB Community Forums

Full Version: Guest username changing disabled, how to solve this
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

during the time we have been getting some user, at times some ask to leave and remove their info and we try to abide with their requests but when we clean everything until they are at the guest user group then we have no manner at all to change the username.

Well at least by using the find system, they don't even show up and when we find them in the forum we can't either.

Can someone help me out in here... I am honestly out of options now.

Thanks
Been doing that on our board, find renaming the user before deleting the easiest.  We use a derivative of their UID for uniqueness.

Also might wish to consider existing quotes with the original nickname.  Something like this ought to work, but haven't tried it.  Think I'd experiment on our test system first: Wink

https://community.mybb.com/thread-208690...pid1313731
It looks like you have to be extra careful doing so. Moreover I never touched even phpMyAdmin

So in the case of removing completely the User and their Threads/Posts

or in the case you want to keep their Threads/Posts but just want to change the User name you have to go there...


With this GDPR rules you have to abide with any of the user requests

Thank you again for the help you may provide me....
since I am far from being a Pro User the easier path for me is always the best, but if there isn't any then phpMyAdmin will be
There's a plugin that is GDPR compliant.  I've never properly tested it - instead taking the shortcut route.  I guess because we're not in the EU, and the solution seemed overly complex.  Governments are good at making things that way. Rolleyes   But here it is:

https://community.mybb.com/mods.php?acti...w&pid=1282
(2023-02-12, 01:13 PM)nixer55 Wrote: [ -> ]Been doing that on our board, find renaming the user before deleting the easiest.  We use a derivative of their UID for uniqueness.

Also might wish to consider existing quotes with the original nickname.  Something like this ought to work, but haven't tried it.  Think I'd experiment on our test system first: Wink

https://community.mybb.com/thread-208690...pid1313731

I have tried this solution because what I was requested was not to delete the content but just to remove the Username

I went to the thread above in order to run those commands on the "SQL" tab but it gives me some errors


By default it tells me (and I am sorry if I am not proficient in these things but MyPHP looks kinda scary)
so the errors are:

mysqli::real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: YES)

Connection for controluser as defined in your configuration failed.

and I wanted to do these via SQL but the look with a red x on each line:
UPDATE `mybb_posts` SET `username`= "<newusername>",  WHERE `username`= "<oldusername>" 
UPDATE `mybb_threads` SET `username`= "<newusername>",  `lastposter` = "<newusername>"  WHERE `username`= "<oldusername>", `lastposter` = "<oldusername>"

I changed the UID of the old username to the one I wanted to see it gone
  • Maria DB 1:10.5.16
  • nginx/1.21.6
  • PHP version: 7.4.30
  • phpMyAdmin: 5.2.0

thank you for any help you may provide me
It would, because you're likely not using the right account.  It's defined in /inc/config.php.  If you're not comfortable - don't mess with it.  Especially without a good backup and means to restore.  On many boards, the posts table is big.  A bad query is - well - bad news. Huh

Just change the username of interest in the ACP.  The link is untested by me.  Since I posted, already see some problems with it, for quotes and incidental mentions.  That might have to be handled via multiple queries - just haven't tested enough.
Thank you nixer55,

I ran some google searches and it seems I have an issue with a login... I do get in but the errors are there!

On trying to run those 2 lines
it didn't even let me do it!!!

I am not confortable doing it but it has to be me doing it since I cannot hire anyone to do it for me.
The phpMyAdmin passwords were changed in the past

On using ACP to delete a already deleted member, it doesn't even show up, but I need it gone
any pointers on what to do or where to go and ask for help?

Thank you very much
Changing a username after account deletion won't work.  The few times I've dealt with it - changed username before the account was deleted.  After deletion, posts show a <new_username>, unregistered in the post_author box.  Only way I could search for posts or threads by that renamed account was exploit the username field in the posts and threads tables and get the TID and PID.  Which means phpmyadmin unfortunately, but I could find them.

Had a look at those linked SQL queries in my test system, and got inconsistent results, also some syntax issues I had to overcome.  So just as well they couldn't be run.  And there's more to the task for quotes and incidental mentions.

None of this helps you I know.  Afraid I don't have an easy fix without database queries.  Even then it's an uphill battle.  Might have to revisit Amnesia myself and take another look. Wink
Assuming you can get phpmyadmin working - already mentioned how to find your board database account in post # 6.  That will do.  Has to work, otherwise your board wouldn't work either.  Guessing you had other accounts for phpmyadmin at one time, don't really know.  Smile

I assume you know the old account name, but it still exists on your board, and must go.  It's now just text, because the account has been deleted.  That's why none of the ACP stuff will work.  That we can deal with.

Open phpmyadmin and navigate to your mybb_posts table by selecting it in the left panel.  Then in the right panel, access the Search tab.  You can now do a find and replace - also at the top.  For Find, put in the old account nickname you want changed.  For Replace with, put in what you want to change it to.  For Column, select Message.

Don't think you need to tick Use regular expression - I didn't, but make sure you have a backup and know how to restore - as already mentioned.  It will give you a preview of all the posts it found with the Find.  You then have the option to proceed if everything looks good.

Good luck - hope you get it sorted...

Edit:  May have to do the same thing only using the username field in both posts and threads tables.  Tried to re-create your scenario, and got myself confused. Toungue