fix error when creating a new user with an invalid email address from the admin tab