How do I re-assign ownership of posts?


(Philip Rhoades) #1

People,

I know what I have done will probably be frowned upon so if no-one is interested in responding . . I will understand . .

After installing Discourse and doing the preliminary setup for the site and doing some initial posts of topics as the main admin user, I created a second active user with a different email address - I had the idea that the first user would be the admin and the first and main poster for the forum and the second user would be just an ordinary user for testing purposes to see what things looked like. Unfortunately I accidentally used the second, ordinary, account to post a bunch of topics . . So I wouldn’t have to repost stuff I fixed this by directly editing the topics, posts and topic_users tables to put the correct user id on the records. Nothing is crashing or otherwise looking bad and from the category listing page, the correct (admin) user is displayed as owning all the topics - BUT on the admin user profile page the the number of posts is still only showing the number of original posts - it is NOT counting the ones that should have been transferred - obviously I am missing something. It is not the end of the world, but it would be nice if someone could point me in the direction of a fix . .

Thanks in advance!

Phil.


(Sam Saffron) #2

There are a lot of tables to touch, this is one reason we have the “reassign ownership” admin option. What you are doing is far from a supported option, but you know that already :slight_smile:

That said, if you really want to dig deeper here, make sure mini profiler is running, then look at the SQL being run, it will show you the names of all tables touched.


(Philip Rhoades) #3

Sam,

Too bad I didn’t see the “reassign ownership” admin option before I started messing around . .

I like digging . . the mini profiler is enabled in the default conf file but ALT-P doesn’t do anything in Chrome or Midori (Fedora 20 x86_64) . .

Thanks,

Phil.


(Dave McClure) #4

You could also try to set the id back to the other user in the one table you modified and then use the “reassign ownership” feature.


(Sam Saffron) #5

See:


(Kane York) #6

Which you get to by using topic admin wrench, Select Posts, select the posts, change owner.