Notifications
Clear all

Script [Closed] Private Messages don't look like they attibute to a new user when you delete an account

3 Posts
2 Users
0 Reactions
606 Views
Posts: 90
Topic starter
(@jasontoth)
Estimable Member
Joined: 4 years ago

I had a user that had two accounts and wanted them merged. By deleting the one account and attributing the posts to the new one I though I was merging all information.

However the user wrote me and said they lost all private messages in this process. (I have the PM plugin on my forum).

Any assistance on how this is supposed to work would be much appreciated.

Best, Jason

2 Replies
Robert
Posts: 10586
Admin
(@robert)
Support Team
Joined: 9 years ago

Hi @jasontoth,

You should execute these two SQL using your hosting cPanel > phpMyAdmin database manager, make sure you're in a corrct database and table prefix is correct, I used wp_ in the SQLs, if it's not wp_ please change them carefully, make sure you've not added extra spaces. Also change the OLDUSERID and NEWUSERID with the userid you've replaced/merged to the new userid:

 

UPDATE `wp_wpforo_pms` SET `fromuserid` = NEWUSERID WHERE `fromuserid` = OLDUSERID;

UPDATE `wp_wpforo_pmfolders` SET `userids` = TRIM(BOTH ',' FROM (SELECT REPLACE(CONCAT(',',userids,','), ',OLDUSERID,', ',NEWUSERID,'))) WHERE FIND_IN_SET('OLDUSERID',userids) > 0;

 

IMPORTANT: in any case, please backup the following two tables:

  • wp_wpforo_pms
  • wp_wpforo_pmfolders
Posts: 90
Topic starter
(@jasontoth)
Estimable Member
Joined: 4 years ago

Thank you for this. Do I have to do this before I delete the user that I am merging as I have already deleted the one account. Thus I am having problems even finding the OLDUSERID...