forum user/profile deletion

blindmime
@blindmime
10 years ago
772 posts
Are forum posts associated with user or profile?

I had a user sign up and post something to the forum. I replied to their post.

I had created a profile for them prior to them creating an account, so I assigned that profile to their new user account and deleted the profile created when they signed up.

When I did that their forum post was deleted.

In the forum index list, it shows their is one topic in the category where we posted. But when I click on that category it says there are no topics.

The datastore shows my reply post, but their initial post is not there.

Hope that makes sense.

I would think forum posts are user-based, but this behavior seems odd if so.

thanks
updated by @blindmime: 02/19/15 09:21:11PM
brian
@brian
10 years ago
10,149 posts
blindmime:
Are forum posts associated with user or profile?

They are associated with both - every item created in a JR DataStore has both a _user_id and _profile_id value.

Quote:
I had a user sign up and post something to the forum. I replied to their post.

I had created a profile for them prior to them creating an account, so I assigned that profile to their new user account and deleted the profile created when they signed up.

When I did that their forum post was deleted.

When you delete a profile, items created as part of that profile will be deleted (part of the profile delete routine is to go through all DataStores and delete items that were created by that profile).

Quote:

In the forum index list, it shows their is one topic in the category where we posted. But when I click on that category it says there are no topics.

The datastore shows my reply post, but their initial post is not there.

Hope that makes sense.

I would think forum posts are user-based, but this behavior seems odd if so.

thanks

Yeah that is correct for how it works right now. If you don't want a profile's data to be gone, don't delete the profile.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
10 years ago
772 posts
Hmm. I just want to delete the profile, not the user. I want to give them a profile I've already set up. It's already got information and items in various modules.

Another thing. They sent me a private note just now. When I look at it, it shows their name as simply "@".

So I'm a little confused. If I assign someone multiple profiles and later delete one, is it going to mess with their user presence like this. Or is it just deleting the initial profile created when they first sign up for an account that causes issues? I guess I could keep the "signup profile" as a kind of dummy profile, but it's a little complicated. Just thinking how to approach this, I guess.

This is potentially problematic for me because many of my sites are directory websites where I have set up profiles for people or businesses prior to them setting up an account. They often sign up for a user account and claim an existing profile. It's common for directory websites to work this way. Think Yelp, etc.
updated by @blindmime: 01/15/15 02:47:06PM
brian
@brian
10 years ago
10,149 posts
blindmime:
Hmm. I just want to delete the profile, not the user. I want to give them a profile I've already set up. It's already got information and items in various modules.

That should be no problem - just note that if you DELETE a profile you delete that profile's items they have created - just an "FYI".

Quote:
Another thing. They sent me a private note just now. When I look at it, it shows their name as simply "@".

So I'm a little confused. If I assign someone multiple profiles and later delete one, is it going to mess with their user presence like this.

No it shouldn't. If you have multiple profiles assigned to a single user account, and you delete ONE of their profiles, the items associated with the profile you deleted will be removed. One thing that might be happening (I'm not sure I'm just thinking out loud) is that if the user was ON that profile last - i.e. the profile you deleted was their "active" profile id, you may see this as JR would see the user, but the profile event listener which normally adds the profile info into the user data would not be able to find the profile info (since it had been deleted).

Quote:
Or is it just deleting the initial profile created when they first sign up for an account that causes issues? I guess I could keep the "signup profile" as a kind of dummy profile, but it's a little complicated. Just thinking how to approach this, I guess.

I would recommend doing this - there a places in JR that check for the user's "Home Profile" which is their initial profile. However, as long as the account is properly linked to additional profile id's, I think you should be able to delete it and have it all work.

Quote:
This is potentially problematic for me because many of my sites are directory websites where I have set up profiles for people or businesses prior to them setting up an account. They often sign up for a user account and claim an existing profile. It's common for directory websites to work this way. Think Yelp, etc.

This really should work no problem - you just have to make sure the user account gets linked up to the profile either manually via the User Profiles -> Tools -> Link User Accounts tool or automatically (which I think you have a small custom module that does it for you?)

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
10 years ago
772 posts
This is a different site than the one with the custom module you created.

Is it possible to log in to one of my user's accounts and see what they're seeing? I'm wondering what effect this deleted profile is having on them.

Tags