Well, yes, that’s the big problem I have now. I was hoping that the google login path would fix up the address when it merges in the authentication record, but no such luck. And I don’t see an option I can set for all these users to force them to change their email address on sign-in.
So right now, I have fixed the problem where we were hammering mailgun with
@gplus.invalid addresses, but have now completely broken the ability to log in via google auth for all imported users who haven’t already logged in with google auth.
It looks like with the imported users disabled as described, they can never log in, because it does not update their email with the email provided in google auth response. It doesn’t even set it as a secondary email. The whole point of the mapping doesn’t work this way.
Could I perhaps enable them but set their bounce score high, reset in 1000 years?
Here’s hoping that I didn’t just break things too badly:
users = User.where(trust_level: 1)
users.each do |u|
s = UserStat.where(user_id: u.id).first
s.bounce_score = 5.0
s.reset_bounce_score_after = 1000.years.from_now
If this works, I’ll change the import script to use this instead of disabling the bad-email users.
It still won’t fix the fact that the google login info email is ignored, but I am hoping it at least works around the most immediate problem.
I’m guessing this is the only importer that has to deal with not having valid email addresses for users, so this is a weird problem.