Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
What happens to attributed forum posts when a user is deleted?
Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Oct 6, 2014 - 5:46 pm

Hey there,

I have a member account that I need to recreate (problems with the current wordpress account syncing properly to our membership plugin), and that would mean that the user's forum posts are deleted.

When a user is deleted in Wordpress, there's the option to attribute their posts to another user account. Does this apply to Simple-Press posts as well as the default wordpress posts/pages?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 6, 2014 - 8:43 pm

No, not yet... but it will in the next version...  Currently, the only option is for posts to get assigned to a guest user with the same name as the original user/poster...  but when SP 5.5.2 releases (late October), you will be able to delete them, have them assigned to guest or have them reassigned to a new user...

Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Oct 6, 2014 - 8:51 pm

Okay, cool. Thanks for the reply.

If I'm not able to wait until late October to take advantage of the new feature, is there any other way to reassign all posts from one user to another? I know this is possible on an individual post basis already...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 6, 2014 - 8:54 pm

Two ways, I guess... one as you say post by post... or if you are going to reassign them all to same user, you might could do it from the db via mysql script...  would have to think on latter to make sure everything gets updated right - might be a couple gotchas...

Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Oct 6, 2014 - 9:03 pm

I figured it might be an SQL query. They'll all be reassigned to the same user, which will make it a bit simpler. She has 1,113 posts though, which is less simple (i.e. no first option)

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 6, 2014 - 9:26 pm

yeah... changing the user id of the post is very straight forward in db query...  problem is that if the user started a topic, then you also have to change user id in the topic...  and after one or both, you have to reset the forum indexes...

Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Oct 6, 2014 - 9:30 pm

So...

Step 1 is to change the user ID column in the posts table from X to Y?

Step 2 is change the user ID in topic table from X to Y?

Step 3 is reset forum indexes?

 

I'm not the most savvy with mysql queries (and wouldn't want to butcher the site or its hundred thousand other posts) - do you know what those specific queries would be (assuming my table prefix is wp_)?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 7, 2014 - 3:38 am

I will take a look shortly to see if I can find out, but I don't have much experience with the database, so we may have to wait for Mr Papa when he is free later on.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 7, 2014 - 9:25 am

afraid no time this morning, but can see about some example queries this evening when home from work..

Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Oct 7, 2014 - 3:20 pm

Thanks. :)  

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625