3

I am using Profile2 on my site, with 3 different Profile2 Profiles set up: A, B & C. These are matched to roles A, B and C.

Users can only create and edit a profile that matches their role, though C users may also have A or B profiles.

While logged in as an administrator, I accidentally added a Profile2 Profile of type C to a users account who only has role A. (Admins can add profiles of any type to existing users.)

I cannot for the life of me find a way to delete the C Profile for this A user. What am I missing? Isn't there any admin tool to remove Profile2 data from a user? The Profile2 page to edit the C Profile only has a "Save" button at the bottom, not a "Remove" or "Delete" button.

1

You need to have the "Administer profiles" permission.

Then you will have a "Delete profile" button at the bottom of the profile page when editing.

You can also access the profile at: /profile-<profile_type>/<uid>/delete and go right to the deletion confirmation box. Note that the path is compose of the word 'profile' then a hypen then the name of the profile type you created, so in your example it would be: /profile-C/<uid>

HTH.

  • But... I am doing this while logged in with the Admin role I created and which has the "Administer Profiles" permission (which, by the way, says "Edit and view all user profiles" on the permissions page and says nothing about deleting). But I still do not have a "Delete" option at the bottom of the page next to "Save". On the Permissions page, each type of profile has individual permissions to "Edit own", "Edit any", "View own", and "View any", but nowhere is there a "Delete own" or "Delete any" permission to grant. And when I go to the URL you suggest, I get a "Page not found" error.. – Christopher Dunning Feb 16 '15 at 2:24
  • I also tried "user/20/delete/full_member_profile" since "user/20/edit/full_member_profile" is where I have editing access. But that alternate URL just showed me the Profiles. Any other suggestions? I'm stumped. I suspect another module is conflicting, but can't figure out which might be... Field Permissions? – Christopher Dunning Feb 16 '15 at 2:25
  • For this to work I had to enable "Provide a separate page for editing profiles." on profile type form. – Roger May 9 '16 at 13:48
0

I wound up creating a Rule that checks for the users role when loading the profile, and deletes profiles that don't match the role.

This is not a long term solution, because users start with Role A or B and eventually change to C, but we want to keep the info of Role A or B as part of their overall profile but just not display it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.