Fix for custom users with emails as usernames