AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

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

3 Posts
2 Users
0 Reactions
1,298 Views
Posts: 94
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@jasontoth)
Estimable Member
Joined: 5 years ago
[#22698]

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: 10716
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 2 months 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: 94
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@jasontoth)
Estimable Member
Joined: 5 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...


Share: