get the UID of the contact associated with the authenticated
            user
322092
def getContactUIDForUser(self):
        
        user = self.REQUEST.AUTHENTICATED_USER
        user_id = user.getUserName()
        r = self.portal_catalog(
            portal_type='Contact',
            getUsername=user_id
        )
        if len(r) == 1:
            return r[0].UID
242385
def query_get_user_contact_info(uid):
    
    # FIXME compatibility with postgresql
    query1 = """SELECT nickname, email,
                       """ + \
        datetime_format('last_login') + \
        """
                     FROM "user" WHERE id=%s"""
    params1 = (uid,)
    res1 = run_sql(query1, params1)
    if res1:
        return res1[0]
    else:
        return ()
201936
def getClientUID(self):
        
        request = self.getRequest()
        if request:
            client = request.getClient()
            if client:
                return client.UID()
736565
def get_user_client(user_or_contact):
    
    if not user_or_contact or ILabContact.providedBy(user_or_contact):
        # Lab contacts cannot belong to a client
        return None

    if not IContact.providedBy(user_or_contact):
        contact = get_user_contact(user_or_contact, contact_types=['Contact'])
        if IContact.providedBy(contact):
            return get_user_client(contact)
        return None

    client = get_parent(user_or_contact)
    if client and IClient.providedBy(client):
        return client

    return None
491541
def get_contact(self, jid):
        
        try:
            return self.get_contacts()[jid.bare()]
        except KeyError:
            raise ContactNotFound
        except AttributeError:
            raise AttributeError("jid must be an aioxmpp.JID object")
513804
def get_user(uid, **kwargs):
    
    user_id=kwargs.get('user_id')
    if uid is None:
        uid = user_id
    user_i = _get_user(uid)
    return user_i
1209175
def get(self, uid):
        
        r = requests.get(self.apiurl + "/users/{}".format(uid), headers=self.header)

        if r.status_code != 200:
            raise ServerError

        jsd = r.json()

        if jsd['data']:
            return jsd['data']
        else:
            return None
1365834
def get_user(
        self, identified_with, identifier, req, resp, resource, uri_kwargs
    ):
        """"""
        return self.user
1305783
def _getUserAuthObject(self, user, connection):
        
        credentials = self._getCredentials(user)
        userAuthObject = AutomaticUserAuthClient(user, connection, **credentials)
        return userAuthObject
825557
function getUserProfile(callback) {
    if (_.isUndefined(callback)) {
    } else {
      var u = baseUrl + "/me";
      var tokenData = this.getAuthToken();
      if (tokenData.type != "bearer") {
        throw new Error("Invalid token type. Must use a token of type bearer.");
      }
      return helper.get(tokenData, u, callback);
    }
  }
237391
def get_user_id(self, user_id, mount_point='app-id', wrap_ttl=None):
        
        path = '/v1/auth/{0}/map/user-id/{1}'.format(mount_point, user_id)
        return self._adapter.get(path, wrap_ttl=wrap_ttl).json()
789563
def getUserByNumber(self, base, uidNumber):
		
		res = self.query(base, "uidNumber="+str(uidNumber), ['uid'])
		if len(res) > 1:
			raise InputError(uidNumber, "Multiple users found. Expecting one.")
		return res[0][0], res[0][1]['uid'][0]
965421
def get_contact_method(self, id, **kwargs):
        """"""
        endpoint = '{0}/{1}/contact_methods/{2}'.format(
            self.endpoint,
            self['id'],
            id,
        )
        result = self.request('GET', endpoint=endpoint, query_params=kwargs)
        return result['contact_method']
244979
def get_user(self, validated_token):
        
        try:
            user_id = validated_token[api_settings.USER_ID_CLAIM]
        except KeyError:
            raise InvalidToken(_('Token contained no recognizable user identification'))

        try:
            user = User.objects.get(**{api_settings.USER_ID_FIELD: user_id})
        except User.DoesNotExist:
            raise AuthenticationFailed(_('User not found'), code='user_not_found')

        if not user.is_active:
            raise AuthenticationFailed(_('User is inactive'), code='user_inactive')

        return user
808461
def get_user(uid):
    
    try:
        acl_url = urljoin(_acl_url(), 'users/{}'.format(uid))
        r = http.get(acl_url)
        return r.json()
        # assert r.status_code == 201
    except DCOSHTTPException as e:
        if e.response.status_code == 400:
            return None
        else:
            raise
9871
def get_id_from_user(user):
    """"""
    id = r_client.hget('user-id-map', user)
    if id is None:
        id = str(uuid4())
        r_client.hset('user-id-map', user, id)
        r_client.hset('user-id-map', id, user)
    return id
658917
def authenticated_userid(request):
    
    user = getattr(request, 'user', None)
    key = user.pk_field()
    return getattr(user, key)