code: def get_primary_user_email_object(self, user):
          
          if self.UserEmailClass:
              user_email = self.db_adapter.find_first_object(
                  self.UserEmailClass,
                  user_id=user.id,
                  is_primary=True)
              return user_email
          else:
              return user
docs: Retrieve the email from User object or the primary UserEmail object (if multiple emails
          per user are enabled).