identify user by email or fall back to account

Note: it seems very hard not to supply a user email in Moodle.