code: def user_has_email(username):
      
      user = api.user.get(username=username)
      if not user.getProperty("email"):
          msg = _(
              "This user doesn't have an email associated "
              "with their account."
          )
          raise Invalid(msg)
  
      return True
docs: make sure, that given user has an email associated