Do not fail when user has no email
This MR prevents throwing errors when a user has no email. The only exception is account_confirmation_email
since this email is sent when account activation is enabled and user emails are required.
Related to #1587 (closed)