Why isn’t that enough to solve your problem?
Shouldn’t those be AND rather than OR?
Discourse enforces them to validate addresses, so I’m not really clear what problem you’re solving. You say this
It seems pretty improbable that you’re going to find users who wanted to log in but couldn’t before, but you may know something I don’t about your setup.
And discourse won’t send emails to addresses that are not validated, so I don’t think this is going to send any emails.
I always do these things on a few accounts but hand to see what’s going to happen.