def get_user_and_user_email_by_id(self, user_or_user_email_id):
        """Retrieve the User and UserEmail object by ID."""
        if self.UserEmailClass:
            user_email = self.db_adapter.get_object(self.UserEmailClass, user_or_user_email_id)
            user = user_email.user if user_email else None
        else:
            user = self.db_adapter.get_object(self.UserClass, user_or_user_email_id)
            user_email = user
        return (user, user_email)
Retrieve the User and UserEmail object by ID.