Closed (duplicate)
Project:
Profile 2
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2016 at 06:05 UTC
Updated:
17 Oct 2018 at 15:46 UTC
Jump to comment: Most recent
Comments
Comment #2
littlepixiez commentedI would say this probably isn't a duplicate of #1549224: Prevent duplicate profiles from being added in the db as that appears to be focusing on preventing future problems. I would really like to know the correct way to handle duplicates also.
I have the same issue - one of my users has duplicate profile IDs for one of my profile types (not sure how it happened).
I thought about doing a Views Bulk Operation as you can create a view of profiles and delete items using this - I also don't know if this will deal with orphaned fields though, it might do exactly what it would do if you just deleted the row in the database.
But this is one alternative to delving into tables if people want to risk it!
Comment #3
kcannick commented@Littlepixiez there is a delete profile function in the profile 2 module that I plan on using to delete the duplicate profiles. I just have to take some time to see which profile is actually editable by user as not to delete the profile (and related fields) with the active data. After I figure that out I may just create an action to purge duplicate profiles and schedule to run once a day.
It's not the desired solution but I have a few dozen duplicate accounts and they happen randomly.
Comment #4
rickj commentedClosing as duplicate of #1549224: Prevent duplicate profiles from being added in the db, which has been committed. That patch includes code to prevent new duplicates, as well as remove existing ones as a database update.