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
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
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...