Support login via email for first-time LDAP logins (MDL-46638)