get the current user id
552640
public static UserGroupInformation getUGI(Configuration conf)
  throws LoginException {
    UserGroupInformation ugi = null;
    if (conf.getBoolean(UGI_SOURCE, true)) {
      // get the ugi from configuration
     ugi = UnixUserGroupInformation.readFromConf(conf,
        UnixUserGroupInformation.UGI_PROPERTY_NAME);
    } else {
      // get the ugi from Subject
      ugi = UserGroupInformation.getCurrentUGI();
    }
    // get the ugi from unix
    if (ugi == null) {
      ugi = UnixUserGroupInformation.login();
      UnixUserGroupInformation.saveToConf(conf, 
          UnixUserGroupInformation.UGI_PROPERTY_NAME,
          (UnixUserGroupInformation)ugi);
    }
    return ugi;
  }
1244100
def get_current_user(self):
        
        from google.appengine.api import users

        if _IS_DEVELOPMENT_SERVER:
            return users.get_current_user()
        else:
            from google.appengine.api import oauth

            try:
                user = oauth.get_current_user()
            except oauth.OAuthRequestError:
                user = users.get_current_user()
            return user
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
705505
def get_user(self, id, **data):
        
        
        return self.get("/users/{0}/".format(id), data=data)
1298225
def get_current_user(self, objectmask=None):
        """"""

        if objectmask is None:
            objectmask = "mask[userStatus[name], parent[id, username]]"
        return self.account_service.getCurrentUser(mask=objectmask)
664930
def get_user(self, username):
        
        for user in self.users:
            if user.id.name == username:
                return user
        return None
1112864
def _get_user(self, user):
        """"""
        return ' '.join([user.username, user.first_name, user.last_name])
107164
def getUser(self):
        
        username = self.getUsername()
        if not username:
            return None
        user = api.user.get(userid=username)
        return user
1062350
def get_current_user_ids(self, db_read=None):
        
        db_read = db_read or self.db_read

        return self.user_ids.using(db_read)
1216123
public function get_user_id()
    {
        if (is_object($this->user)) {
            return $this->user->ID;
        }
        else if (isset($_SESSION['user_id'])) {
            return $_SESSION['user_id'];
        }

        return null;
    }
43707
def check_user(user_id, u_pass):
        '''
        
        '''
        user_count = TabMember.select().where(TabMember.uid == user_id).count()
        if user_count == 0:
            return -1
        the_user = TabMember.get(uid=user_id)
        if the_user.user_pass == tools.md5(u_pass):
            return 1
        return 0
1245533
def get_last_user(self, refresh=False):
        """"""
        if refresh:
            self.refresh_complex_value('sl_UserCode')
        val = self.get_complex_value("sl_UserCode")
        # Syntax string: UserID="<pin_slot>" UserName="<pin_code_name>"
        # See http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#DoorLock1

        try:
            # Get the UserID="" and UserName="" fields separately
            raw_userid, raw_username = val.split(' ')
            # Get the right hand value without quotes of UserID="<here>"
            userid = raw_userid.split('=')[1].split('"')[1]
            # Get the right hand value without quotes of UserName="<here>"
            username = raw_username.split('=')[1].split('"')[1]
        except Exception as ex:
            logger.error('Got unsupported user string {}: {}'.format(val, ex))
            return None

        return ( userid, username )
361278
def by_current_session(cls):
        
        session = Session.current_session()
        if session is None:
            return None
        return cls.where_id(session.user_id)
856405
def get_current_user(self, **params):
        """"""
        response = self._get('v2', 'user', params=params)
        return self._make_api_object(response, CurrentUser)
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
926212
def _get_user_id_from_name(self, context_id, user_name):
        """"""
        users = self.zap.users.users_list(context_id)
        for user in users:
            if user['name'] == user_name:
                return user['id']

        raise ZAPError('No user with the name "{0}"" was found for context {1}'.format(user_name, context_id))
927359
def _CaptureUserId(self):
    """"""
    user_kind, user_id = user_id_collector()
    if user_kind and user_id:
      self.breakpoint['evaluatedUserId'] = {'kind': user_kind, 'id': user_id}