'Loads user data from service'

def user_data(self, access_token, *args, **kwargs):

    url = ((GITHUB_USER_DATA_URL + '?') + urlencode({'access_token': access_token}))
    try:
        data = simplejson.load(dsa_urlopen(url))
    except ValueError:
        data = None
    if (data and self.GITHUB_ORGANIZATION):
        member_url = ((GITHUB_ORGANIZATION_MEMBER_OF_URL.format(org=self.GITHUB_ORGANIZATION, username=data.get('login')) + '?') + urlencode({'access_token': access_token}))
        try:
            response = dsa_urlopen(member_url)
        except HTTPError:
            data = None
        else:
            if (response.code != 204):
                raise AuthFailed("User    doesn't    belong    to    the    organization")
    return data
