Returns the User object identified by the
name argument.
481636
public User get(String name) {

        User user = (User) userList.get(name);

        if (user == null) {
            throw Error.error(ErrorCode.X_28501, name);
        }

        return user;
    }
235386
def get_user(self, sAMAccountName):
		
		logger.debug('Polling AD for user %s'% sAMAccountName)
		ldap_filter = r'(&(objectClass=user)(sAMAccountName=%s)' % sAMAccountName
		attributes = MSADUser.ATTRS
		for entry in self.pagedsearch(ldap_filter, attributes):
			# TODO: return ldapuser object
			yield MSADUser.from_ldap(entry, self._ldapinfo)
		logger.debug('Finished polling for entries!')
802628
def currentUser(extras=nil)
      method = 'currentUser'
      type = User
      args = {}
      args[:extras] = extras if extras
      return_object type,method,args,true
    end
1326188
async def getAuthInfo(self, name):
        '''
        
        '''
        item = self._getAuthItem(name)
        pack = item.pack()

        # translate role guids to names for back compat
        if pack.get('type') == 'user':
            pack['roles'] = [self.cell.auth.role(r).name for r in pack['roles']]

        return (name, pack)
998831
def assignee(self):
        
        if self.api and self.assignee_id:
            return self.api._get_user(self.assignee_id)
516537
def user_exists(name, runas=None):
    '''
    
    '''
    if runas is None and not salt.utils.platform.is_windows():
        runas = salt.utils.user.get_user()
    return name in list_users(runas=runas)
276380
def get_current_user():
    """"""
    thread_local = AutomatedLoggingMiddleware.thread_local
    if hasattr(thread_local, 'current_user'):
        user = thread_local.current_user
        if isinstance(user, AnonymousUser):
            user = None
    else:
        user = None

    return user
25911
private Long getUserIdArg(Object[] arguments) {
        if (arguments.length <= USER_ID_INDEX) {
            log.error("Illegal number of args: " + arguments.length);
        }
        return (Long) arguments[USER_ID_INDEX];
    }
481395
def get_user_id(self, user):
        
        user_field = getattr(settings, 'SAML_IDP_DJANGO_USERNAME_FIELD', None) or \
                     getattr(user, 'USERNAME_FIELD', 'username')
        return str(getattr(user, user_field))
1305783
def _getUserAuthObject(self, user, connection):
        
        credentials = self._getCredentials(user)
        userAuthObject = AutomaticUserAuthClient(user, connection, **credentials)
        return userAuthObject
778762
def get(self):
        
        self._user = self._client.get(
            url=self._client.get_full_url(
                self.get_path(
                    'single', realm=self._realm_name, user_id=self._user_id
                )
            )
        )
        self._user_id = self.user["id"]
        return self._user
353801
def get_user(self, name):
        """"""
        users = self.data['users']
        for user in users:
            if user['name'] == name:
                return user
        raise KubeConfError("user name not found.")
937156
def get_user_by_id(self, id):
        """"""
        return self.db_adapter.get_object(self.UserClass, id=id)
601932
def get(self, user_name: str) -> User:
        
        user = current_user()
        if user.is_admin or user.name == user_name:
            return self._get_or_abort(user_name)
        else:
            abort(403)
456174
def get_user_name():
    

    if sys.platform == 'win32':
        #user = os.getenv('USERPROFILE')
        user = os.getenv('USERNAME')
    else:
        user = os.getenv('LOGNAME')

    return user
815436
def get_user(self, username=None, params=None):
        
        return self.transport.perform_request(
            "GET", _make_path("_security", "user", username), params=params
        )
211061
public User getUser(String name){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.GetUser);

        GetUserProtocol p = new GetUserProtocol(name);

        Response resp = connection.submitRequest(header, p, null);
        return ((GetUserResponse) resp).getUser();
    }