Hi --
The situation with a club membership is that many members change email address over time, as well as forget their login details; and then want to renew their membership.
If they still had their old email address, they would use the "Password forgotten?" button no problem, but now they can't. They could contact the webmaster or other contact at the club to change their email (saving themselves re-typing a lot of info) before renewing, but I find very few do that --- they mostly will make a new account.
So now I have two joomla users representing the same person, and two MembershipPro subscribers, with two membership-IDs, etc. How can I best merge these into one? I want to keep the new profile data and especially email of course, but the old membership-ID and possibly creation datetime.
[[This is what the club wants: They want to know retention rates (how long does a member stay a member?, knowing this tells you whether to focus on recruiting new members or on retaining existing ones), they want to highlight long-term members (at say their 10th, 20th, 25th year of membership), and they want the members to have access to their membership history.]]
Experimentally, if I stay in the Joomla backend I can merge the users but a 'ghost' remains:
--Manually I can change the User of each old Subscription [from a list of all users], one-by-one,
--Then I change the Membership-ID of the newest to the old one
What this does is that it lets the member see their full history on their Profile/Subscription History/Active Subscription page. But in the backend on the Subscribers tab, if you search for their name there's now two identities --- the oldest one without subscriptions and the newer one with all the subscriptions.
To kill the 'ghost' without subscriptions, I had to go to PHPmyAdmin and do it there. So I might as well skip the previous step(s) in merging, and do it here:
--Select all the past and present subscriptions concerned; for example by the person's name (if they're always spelling the same) and/or by the two or more emails concerned ([NOTE: I can't write correct MySQL statements, as they get picked up as attempted SQL injections.] A "select from" statement on the "jos_osmembership_subscribers" table for right "first_name" and "last_name").
--To kill the 'ghost', I set in the column "is_profile" all old ones to zero (ONLY the newest is one).
--From that list of all subscriptions involved; now you read the newest user-ID and username from this list as well as the oldest membership-ID, and set all to this (So an "update" statement on the table "jos_osmembership_subscribers", SETting the "user_id", "membership_id" and "username" on all those previously selected ---- but note I do not want to overwrite their data so I leave "profile_id" unchanged; you could as that's an option in the component settings).
--I could go to the "jos_osmembership_field_value" table and delete all the orphaned profile data on the killed ghost... But I think that's a bad idea, because it's irreversible: There are many people with the same name different email (e.g., there may be many John Brown, Joan Davies, Tom Smith, ... ) --- if you accidentally merge them you cannot un-merge them unless you have good & frequent backups & a lot of time to invest.
--I could delete the obsolete Joomla user, if I'm certain I didn't make a mistake (again --- irreversible).