- Posts: 9
- Thank you received: 0
How to manually merge two members?
- Marvin The Martian
- Topic Author
- Offline
- New Member
-
Less
More
6 years 4 weeks ago #123900
by Marvin The Martian
How to manually merge two members? was created by Marvin The Martian
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).
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).
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
6 years 4 weeks ago #123913
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to manually merge two members?
I think the easiest way would be deleting new user account and new subscription belong to that account:
- Go to Membership Pro -> Subscriptions, delete the subscription records belong to his new account.
- Then go to Users -> Manage, delete the new user account
Not sure why you have to delete data via database
Tuan
- Go to Membership Pro -> Subscriptions, delete the subscription records belong to his new account.
- Then go to Users -> Manage, delete the new user account
Not sure why you have to delete data via database
Tuan
Please Log in or Create an account to join the conversation.
- Marvin The Martian
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
6 years 4 weeks ago #123932
by Marvin The Martian
Replied by Marvin The Martian on topic How to manually merge two members?
Hi Tuan,
Wait, the new subscription is real, legitimate --- so I don't want to delete the new user & subscription. I want to merge together the two identities and keep all their subscriptions...
When I have a single person that is a paying member for say 2008--2012, 2014--2017, 2018--2019: Three different Joomla-users with three different emails... I want to merge these three into one Subscriber/user that joined in 2008, uses his most recent login, and is a member 2008--2019 with two gaps (2year+1year).
So I go into the database mostly to remove the <is_profile> flag that keeps a 'ghost' subscriber-without-subscriptions around (GDPR unused data deletion and all that).
Wait, the new subscription is real, legitimate --- so I don't want to delete the new user & subscription. I want to merge together the two identities and keep all their subscriptions...
When I have a single person that is a paying member for say 2008--2012, 2014--2017, 2018--2019: Three different Joomla-users with three different emails... I want to merge these three into one Subscriber/user that joined in 2008, uses his most recent login, and is a member 2008--2019 with two gaps (2year+1year).
So I go into the database mostly to remove the <is_profile> flag that keeps a 'ghost' subscriber-without-subscriptions around (GDPR unused data deletion and all that).
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.