Jump to content

Members with no email addresses


The.Reaper

Recommended Posts

Posted

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?

Posted

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.

Posted

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` = '';

 

Posted

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 AutoItScriptThis worked, all i had to change was 'members' to 'ibf_core_members'

Posted

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.

Posted

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.

Posted

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"

Posted

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.

Posted

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!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...