'Validates and returns the requested_user, while checking permissions.'

def _clean_requested_user(self, cleaned_data, course_key):

    requesting_user = self.initial['requesting_user']
    requested_username = cleaned_data.get('username', None)
    if (not requested_username):
        return self._verify_no_user(requesting_user, cleaned_data, course_key)
    elif (requesting_user.username.lower() == requested_username.lower()):
        return self._verify_requesting_user(requesting_user, course_key)
    else:
        return self._verify_other_user(requesting_user, requested_username, course_key)
