I have several hundred users who have the same email address whom I want to merge together, I was wondering what the SQL query would be for it, I thought it could be something like;
but I think that would only work on one user, and I have several hundred, I'm looking for a way other than "Merge Users" in the admincp, as it would take hours. I'm not adverse to doing it manually, however if there is a quicker way, naturally I will take it.
Again, I need to MERGE the users based on email address, the above query is most likely wrong because I couldn't find the SQL which merges the accounts.
Edit, I've found the SQL to LIST users with the same email address;
now how would I merge them? :/
Code:
UPDATE vb_user SET username = X WHERE email LIKE '%[email protected]%'
Again, I need to MERGE the users based on email address, the above query is most likely wrong because I couldn't find the SQL which merges the accounts.
Edit, I've found the SQL to LIST users with the same email address;
Code:
SELECT username, email FROM vb_user GROUP BY email HAVING COUNT(email) > 1
Comment