XF 1.1 After import, some posts by Guest

Donnie La Curan

Active member
A user brought it up to me today. He actually had to make a new account because it didn't exist in the import. Though he said if you search for his username it pulls up all the posts he made. I looked in the thread and post table but all of those ids are associated with Guest user_id 0.

Kinda strange that search for his name pulls those posts up but they are in no way associated with him, that I can tell.

I did a search for all threads by Guest and there were ~150. Same thing for posts but about ~450.

Anything I can do to reassociate those posts to the appropriate users? Or are they just lost in the void.
 

Jake Bunce

XenForo moderator
Staff member
Run these queries:

Rich (BB code):
UPDATE xf_post
SET user_id = new_user_id, username = 'new username'
WHERE username = 'old username'
AND user_id = 0;

UPDATE xf_thread
SET user_id = new_user_id, username = 'new username'
WHERE username = 'old username'
AND user_id = 0;
Then rebuild the caches:

Admin CP -> Tools -> Rebuild Caches

And update the post counts:

http://xenforo.com/community/resources/rebuild-user-post-counts-query.363/
 

DCMS

Member
Run these queries:

Rich (BB code):
UPDATE xf_post
SET user_id = new_user_id, username = 'new username'
WHERE username = 'old username'
AND user_id = 0;

UPDATE xf_thread
SET user_id = new_user_id, username = 'new username'
WHERE username = 'old username'
AND user_id = 0;
Then rebuild the caches:

Admin CP -> Tools -> Rebuild Caches

And update the post counts:

http://xenforo.com/community/resources/rebuild-user-post-counts-query.363/
Hi guise, is this query valid for Xenforo 2 too?
 
Top