Gets a request that gets all the users of an enterprise
The session provided must be associated with an enterprise admin user

@return request to get all users of an enterprise
493497
public BoxRequestsUser.GetEnterpriseUsers getEnterpriseUsersRequest() {
        BoxRequestsUser.GetEnterpriseUsers request = new BoxRequestsUser.GetEnterpriseUsers(getUsersUrl(), mSession);
        return request;
    }
1147027
public function getUser()
    {
        /** @var AbstractAdmin $admin */
        $admin = $this;

        $container = $admin->getContainer();

        if (!$container->has('security.token_storage')) {
            return null;
        }

        $tokenStorage = $container->get('security.token_storage');

        if (null === $token = $tokenStorage->getToken()) {
            return null;
        }

        if (!\is_object($user = $token->getUser())) {
            // e.g. anonymous authentication
            return null;
        }

        return $user;
    }
459451
function getCurrentUser() {
    var fields = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        fields[_i - 0] = arguments[_i];
    }
    return getCurrentServer().user;
}
461268
public ConfigurationRequest getEnrichedRequestedConfiguration() {
        final Map<String, String> regularUsers = userService.loadAll().stream()
                .collect(Collectors.toMap(User::getName, User::getName));

        final Map<String, String> userNames = ImmutableMap.<String, String>builder()
                .put(graylogConfig.getRootUsername(), graylogConfig.getRootUsername())
                .putAll(regularUsers)
                .build();

        return getConfigurationRequest(userNames);
    }
130410
public function requestLoginToken()
    {
        // Get dependencies
        $session = $this->container->sessionHandler;
        $email = $this->container->emailHandler;
        $security = $this->container->accessHandler;
        $userMapper = ($this->container->dataMapper)('UserMapper');
        $body = $this->request->getParsedBody();

        // Fetch all users
        $userList = $userMapper->find();

        // Clean provided email
        $providedEmail = strtolower(trim($body['email']));

        $foundValidUser = false;
        foreach ($userList as $user) {
            if ($user->email === $providedEmail) {
                $foundValidUser = $user;
                break;
            }
        }

        // Did we find a match?
        if (!$foundValidUser) {
            // No, log and silently redirect to home
            $this->container->logger->alert('Failed login attempt: ' . $body['email']);

            return $this->redirect('home');
        }

        // Belt and braces/suspenders double check
        if ($foundValidUser->email === $providedEmail) {
            // Get and set token, and user ID
            $token = $security->generateLoginToken();
            $session->setData([
                $this->loginTokenKey => $token,
                $this->loginTokenExpiresKey => time() + 120,
                'user_id' => $foundValidUser->id,
                'email' => $foundValidUser->email
            ]);

            // Get request details to create login link and email to user
            $scheme = $this->request->getUri()->getScheme();
            $host = $this->request->getUri()->getHost();
            $link = $scheme . '://' . $host;
            $link .= $this->container->router->pathFor('adminProcessLoginToken', ['token' => $token]);

            // Send message
            $email->setTo($providedEmail, '')
                ->setSubject('PitonCMS Login')
                ->setMessage("Click to login\n\n {$link}")
                ->send();
        }

        // Direct to home page
        return $this->redirect('home');
    }
1089537
def get_users(self):
        
        # We make use of the existing controlpanel `@@usergroup-userprefs`
        # view logic to make sure we get all users from all plugins (e.g. LDAP)
        users_view = UsersOverviewControlPanel(self.context, self.request)
        return users_view.doSearch("")
1328909
public function getUserSession() {
		if (isset($_SESSION['user_'.$this->usernameKey])) {
			$arrUser = array();
			foreach ($_SESSION as $strKey => $strValue)
				if (substr($strKey, 0, 4) == 'user_')
					$arrUser[substr($strKey, 4)] = $strValue;
			return $arrUser;
		}

		return false;
	}
641742
def get_all_users(resource_root, view=None):
  
  return call(resource_root.get, USERS_PATH, ApiUser, True,
      params=view and dict(view=view) or None)
760946
public function getAll(){
        $rest = $this->getService( self::API_VPN_USER);
        $rest->GET();

        return $rest->getResultAsArray( models\VPN\Server\User::class);
    }
92802
def fetchAllUsers(self, rawResults = False) :
        """"""
        r = self.connection.session.get(self.URL)
        if r.status_code == 200 :
            data = r.json()
            if rawResults :
                return data["result"]
            else :
                res = []
                for resu in data["result"] :
                    u = User(self, resu)
                    res.append(u)
                return res
        else :
            raise ConnectionError("Unable to get user list", r.url, r.status_code)
795065
public function getUser()
    {
        if (! $this->_user) {
            $request = $this->getRequest();

            $this->_user = $this->loader->getUser($request->getParam($this->usernameFieldName), $request->getParam($this->organizationFieldName));
        }
        return $this->_user;
    }
872265
public function getAllUsersIndex()
    {
        $user = new User($this->di->get("db"));
        $users = $user->getAllUsers();

        $views = [
            ["comment/users/view-all", ["users" => $users], "main"]
        ];

        $this->di->get("pageRenderComment")->renderPage([
            "views" => $views,
            "title" => "Coffee users"
        ]);
    }
1343974
public function getUser() {
		if (!is_null($this->session)) {
			return $this->session->getUser();
		} else {
			return $this->context->getSystem()->getUser();
		}
	}
346238
public Principal getUserPrincipal()
    {
        LoginHandler lh = Handlers.get( getServletContext() ).getLoginHandler();
        return lh.getUserPrincipal(getHandlerContext());
    }
1302176
public function actionGetUser()
    {
        $rr = new RequestResponse();

        $rr->data = [
            'identity' => \Yii::$app->user->identity,
            'user' => \Yii::$app->user,
        ];

        return $rr;
    }
565440
protected function getUser()
    {
        if ($this->_user === null) {
            $this->_user = $this->getClient()->user;
        }
        return $this->_user;
    }
447999
public function getAll()
    {
        if ($this->isRequestGet()) {
            try {
                $format   = $this->getRequestParameter('format');
                $search   = $this->hasRequestParameter('search') ? $this->getRawParameter('search') : '';
                $limit    = $this->hasRequestParameter('limit') ? $this->getRequestParameter('limit') : 30;
                $offset   = $this->hasRequestParameter('offset') ? $this->getRequestParameter('offset') : 0;
                $selectedUris = [];

                if(! empty($search) ){
                    $decodedSearch = json_decode($search, true);
                    if(is_array($decodedSearch) && count($decodedSearch) > 0){
                        $search = $decodedSearch;
                    }
                }
                if($this->hasRequestParameter('selectedUri')){
                    $selectedUri = $this->getRequestParameter('selectedUri');
                    if (!empty($selectedUri)) {
                        $selectedUris = [$selectedUri];
                    }
                }

                $class = $this->getClassParameter();
                if ($this->hasRequestParameter('classOnly')) {
                    $resources = $this->getResourceService()->getClasses($class, $format, $selectedUris, $search, $offset, $limit);
                } else {
                    $resources = $this->getResourceService()->getResources($class, $format, $selectedUris, $search, $offset, $limit);
                }

                $user = \common_Session_SessionManager::getSession()->getUser();
                if(isset($resources['nodes'])){
                    $permissions = $this->getResourceService()->getResourcesPermissions($user, $resources['nodes']);
                } else {
                    $permissions = $this->getResourceService()->getResourcesPermissions($user, $resources);
                }

                $this->returnSuccess([
                    'resources' => $resources,
                    'permissions' => $permissions
                ]);

            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }
    }