Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
The.Reaper Posted July 1, 2015 Posted July 1, 2015 Okay i have ran into a problem when upgrading to IPB4, Alot of my members have no email addresses on their accounts and now when they try to log into the forums their accounts get deleted.Does anyone have any ideas on how i can sort this out?
AutoItScript Posted July 2, 2015 Posted July 2, 2015 I imagine most/all people have email validation on registration so won't have any members that have no address. I must admit I thought email addresses were required in 3.4.
The.Reaper Posted July 2, 2015 Author Posted July 2, 2015 Yes you are completely right, but we used to delete members email addresses who joined our clan to minimise the risk of account recovery, we used to manually change their passwords if they forgot, it seems this has come around to bite us in the ... Edit: This was not all forum members, just the members who joined our in-game clan.
AutoItScript Posted July 2, 2015 Posted July 2, 2015 Hmm, you could try giving all members with a blank email a fake address? That could be an SQL query. Not sure if/how would cope with the duplicates though as you can use the email address as a login id. Please backup your board and TEST this before using. It gives members with no email address a fake email address of member_id@yourdomain.com. This query is for 3.4.UPDATE members SET `email` = CONCAT(`member_id`, '@yourdomain.com') WHERE `email` = '';You can preview what members will be selected by running this one first:SELECT * FROM members WHERE `email` = '';
The.Reaper Posted July 2, 2015 Author Posted July 2, 2015 Hmm, you could try giving all members with a blank email a fake address? That could be an SQL query. Not sure if/how would cope with the duplicates though as you can use the email address as a login id. Please backup your board and TEST this before using. It gives members with no email address a fake email address of member_id@yourdomain.com. This query is for 3.4.UPDATE members SET `email` = CONCAT(`member_id`, '@yourdomain.com') WHERE `email` = '';You can preview what members will be selected by running this one first:SELECT * FROM members WHERE `email` = ''; Thank you very much AutoItScript, This worked, all i had to change was 'members' to 'ibf_core_members'
AutoItScript Posted July 2, 2015 Posted July 2, 2015 My replies above got merged. That mysql is what I just checked on 3.4.8 test board. The email addresses generate are unique, so member_id 1 would get 1@yourdomain.com and member_id 1000 would get 1000@yourdomain.com and only users with no email addresses would be affected - so this should be good enough to get through a v3 to v4 upgrade. There's not much else you can do apart from manually assigning everyone an email address and I'm guessing there's too many or you wouldn't have asked If you've already upgraded and things are broken then yeah, you'll need to work out how bad first. The query above would still work but it would be on the core_members table rather than members.
ctrlbrk Posted July 2, 2015 Posted July 2, 2015 Wow, so you guys are saying if the email field is blank before a database migration, the user isn't migrated -- it's just deleted? I probably have a thousand members or more without email addresses, because part of our unsubscribe mod was to delete their email address if they flagged us as spam to prevent any further contact.Coming from vb 3.8.8.
The.Reaper Posted July 2, 2015 Author Posted July 2, 2015 What AutoItScript said works, i actually made a little edit to it though. UPDATE `ibf_core_members` SET `email` = CONCAT(`name`, '@mydomain.com') WHERE `email` = ''; This made it so that instead of using the user id it showed the name of the person "Fredss@mydomain.com"
ctrlbrk Posted July 2, 2015 Posted July 2, 2015 What AutoItScript said works, i actually made a little edit to it though. UPDATE `ibf_core_members` SET `email` = CONCAT(`name`, '@mydomain.com') WHERE `email` = ''; This made it so that instead of using the user id it showed the name of the person "Fredss@mydomain.com"You might be careful depending on your username rules, some may have spaces which would be invalid. If I understand the problem, you could simply use "blank" (the word blank) and it would work, or maybe blank@blank.com if it checks for valid format.
AutoItScript Posted July 2, 2015 Posted July 2, 2015 Yeah I used member_id because I wasn't sure if your members names had spaces or invalid email chars in there.
The.Reaper Posted July 2, 2015 Author Posted July 2, 2015 This also helped me alot because i didn't want peoples emails to be public so i used the following code to change all of the email addresses on my boards to the "name@mydomain.com" format! UPDATE `ibf_core_members` SET `email` = CONCAT(`name`, '@mydomain.com') This helps all the people that were worried about the email security in a post a few weeks back!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.