XF 1.3 User showing as "guest"

nodle

Well-known member
I have a user that shows as a "guest" he is not associated with any group. He was leftover from a import from IPB way back in the day. He later joined under a different name. All his post show but there is no account associated with him such as a user, banned, etc. He is just a "guest". Is there any way to associate this with an account so I can have control to say merge it with his other account etc.? Or has anyone else run into this problem and were able to resolve it? Thanks for the help. :)
 
There won't be any data in any of the tables so it won't be possible to merge with another account.
There may be an add-on available which can do it, but I'm not aware of one.

The other option is to look for add-ons which allow threads and posts to be reassigned.
 
@ Brogan @Jake Bunce did post a 'solution' a while back using database queries:

http://xenforo.com/community/threads/after-import-some-posts-by-guest.48691/#post-522195

This would assume that there are no other guest posts, otherwise these would also be associated with the user.

Would this work in this instance for just associating the posts and threads with the new user account?

This looks promising @Jake Bunce would this still work on 1.3? I know he is the only guest so I would be safe there. Thanks for this @Martok ! @Donnie La Curan did you try this on your site and did it work?
 
This looks promising @Jake Bunce would this still work on 1.3? I know he is the only guest so I would be safe there. Thanks for this @Martok ! @Donnie La Curan did you try this on your site and did it work?
I've used this to re-create an account that I deleted and then changed my account deletion policy (in my case I created a new account and then ran Jake's queries). I didn't follow the rebuild post count query resource, I simply changed the post count in the users details in the ACP after checking how many posts there were being transferred from 'guest' to the new user and adding that on. I'd check with Jake if it's OK to do this for your user though with him still being 'live' whereas my user is long gone and unlikely to return.
 
I've used this to re-create an account that I deleted and then changed my account deletion policy (in my case I created a new account and then ran Jake's queries). I didn't follow the rebuild post count query resource, I simply changed the post count in the users details in the ACP after checking how many posts there were being transferred from 'guest' to the new user and adding that on. I'd check with Jake if it's OK to do this for your user though with him still being 'live' whereas my user is long gone and unlikely to return.
Thanks for the help sir. I don't really care about his post count and I know he doesn't either. I mostly just wanted to clean up the forum so that I wouldn't have this user with no avatar and just some control over it.
 
I guess I should make it clear that the user does have a name, he is just in a class as "guest" So I can't search for posts or threads by either the group or the user name in case it makes a difference. He basically just kinda shows as a deleted user and you can't click on his name either.

aa.webp
 
I guess I should make it clear that the user does have a name, he is just in a class as "guest" So I can't search for posts or threads by either the group or the user name in case it makes a difference. He basically just kinda shows as a deleted user and you can't click on his name either.

View attachment 75584
Follow Jake's instructions in the post I linked to. In your database the user's posts will be associated with user_id=0 which is the guest user. His instructions show you how to change them so they are linked to his new user account (you'll need to find the user_id for that).

As I said before, it's important that there are no guest posts or other deleted users, otherwise following those instructions will reallocate all guest and deleted user posts to this user.
 
Can't I just associate a new user id to it so he just becomes a new user then after he is a new user them merge the two account together? I would feel more comfortable merging the users in the ACP than running queries. Not to comfortable doing that stuff. So for example would I use this?

Code:
UPDATE xf_post
SET user_id = test_user_33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = test_user_33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;

Something like that? Does the user id really matter? Or will it mess things up later if someone goes to join with that user id will it just skip to the next number?
 
Cant I just associate a new user id to it so he just becomes a new user then after he is a new user them merge the two account together? I would feel more comfortable merging the users in the ACP than running queries. Not to comfortable doing that stuff. So for example would I use this?

Code:
PDATE xf_post
SET user_id = test_user_33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = test_user_33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;

Something like that? does the user id really matter? Or will it mess things up later if someone goes to join with that user id will it just skip to the next number?
You're not merging users, you're associating the posts which are currently allocated to the guest user with your new user.

The user_id is essential in this, you must use your user's current id for new_user_id in the queries.
 
Ok so I looked at the member id and it would be something like this then?

Code:
UPDATE xf_post
SET user_id = c-pav.21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = c-pav.21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

I noticed under the member page it shows "c-pav.21" so do I not use underscores?
 
Ok so I looked at the member id and it would be something like this then?

Code:
UPDATE xf_post
SET user_id = c-pav.21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = c-pav.21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

I noticed under the member page it shows "c-pav.21" so do I not use underscores?
user_id is just the number, in this case 21.
 
Ya I must be messing something up I tried to create a new user, and even tried his name with underscores etc. But nothing seems to happen when I run the queries.

Code:
UPDATE xf_post
SET user_id = 21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = 21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

Even created a test user hoping to import in there:

Code:
UPDATE xf_post
SET user_id = 33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = 33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;
 
Ya I must be messing something up I tried to create a new user, and even tried his name with underscores etc. But nothing seems to happen when I run the queries.

Code:
UPDATE xf_post
SET user_id = 21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = 21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

Even created a test user hoping to import in there:

Code:
UPDATE xf_post
SET user_id = 33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = 33, username = 'test'
WHERE username = 'Corey'
AND user_id = 0;
Why are you creating a new user? You said the user had created a new account.

[QUOTE="nodle, post: 778235, member: 8230"He later joined under a different name.[/QUOTE]
You should be using the details for this new user. Check their entry in the xf_user table to make sure you're using the correct user_id and username.

This definitely works as I've done this on my site.
 
Yes I tried but it would work importing him. This was what I used for him.

Code:
UPDATE xf_post
SET user_id = 21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

UPDATE xf_thread
SET user_id = 21, username = 'C Pav'
WHERE username = 'Corey'
AND user_id = 0;

I just wonder if it can't work because it can't find the old user named "Corey" because he doesn't exist? I also believe I tried his name as C_Pav since he has a space in it.
 
Just wanted to update and tell you that I got this to work. Was running eh query in the wrong place. :whistle: It seemed to have worked fine. It affected #278 tables so I take it that's how many post that I could add to his post count? Or would this update automatically?
 
Follow Jake's instructions in the post I linked to. In your database the user's posts will be associated with user_id=0 which is the guest user. His instructions show you how to change them so they are linked to his new user account (you'll need to find the user_id for that).

As I said before, it's important that there are no guest posts or other deleted users, otherwise following those instructions will reallocate all guest and deleted user posts to this user.


Trying to make sure I understand this a bit better. We just ran an import from ip.board to xenforo and when we did a LOT of old posts from what must have been a previous import showed up. Of course, all of those old posts (there are thousands) are assigned to a user name that is no longer a user in xenforo and the title "guest" shows below each name. I would like to go through and reassign many of those guest posts to current members (when I can ID who is who).

The thing is... there are thousands of those posts. Are you saying if I run the query listed above, the first time I run it, it will assign ALL of the posts that have guest under the user name to the first user?

Is there a query that could be run that would do this piece by piece?
 
Top Bottom