Listing the users.
@return string
349459
public function actionMembers()
    {
        $searchModel = new UserSearch();
        return $this->render('members', [
            'dataProvider' => $searchModel->search(Yii::$app->request->get()),
            'searchModel'  => $searchModel,
        ]);
    }
1323750
public function index()
    {
        $dataGrid = new UserDataGrid($this->repository->query());

        return view('avored-framework::user.user.index')
            ->withDataGrid($dataGrid->dataGrid);
    }
330853
public List<String> listUsers() {
    List<String> users = new ArrayList<String>(this.users.keySet());
    Collections.sort(users);
    return users;
  }
23625
public function getUsers()
    {
        // get the user list
        return $this->apiCall('users.list')->then(function (Payload $response) {
            $users = [];
            foreach ($response['members'] as $member) {
                $users[] = new User($this, $member);
            }
            return $users;
        });
    }
277056
public function getUserGroups() {

        $db = $this->db;

        $query = $db->getQuery(true)
                    ->select('a.*, COUNT(DISTINCT b.id) AS level')
                    ->from($db->quoteName('#__usergroups') . ' AS a')
                    ->join('LEFT', $db->quoteName('#__usergroups') . ' AS b ON a.lft > b.lft AND a.rgt < b.rgt')
                    ->group('a.id, a.title, a.lft, a.rgt, a.parent_id')
                    ->order('a.lft ASC');

        return $db->setQuery($query)
                  ->loadObjectList();

    }
838456
public function getUserGroupNames()
    {
        /** @var OxpsPaymorrowOxUser|oxUser $this */

        /** @var oxList $oGroups */
        if ( !( $oGroups = $this->getUserGroups() ) ) {
            return '';
        }

        $aGroups = array();

        foreach ( $oGroups as $oGroup ) {
            if ( $this->_isGroupValid( $oGroup ) ) {
                $aGroups[] = $oGroup->oxgroups__oxtitle->value;
            }
        }

        return implode( ', ', $aGroups );
    }
642268
public function getIncludeUserIds()
    {
        $ids = [];

        foreach ($this->usersToNotify as $user) {
            $ids[] = $user->getId();
        }

        return $ids;
    }
973942
public function listCommand()
    {
        $users = $this->userService->getUsers();

        $tableRows = [];
        $headerRow = ['Name', 'Email', 'Account(s)', 'Role(s)', 'Active'];

        foreach ($users as $user) {
            $tableRows[] = $this->getTableRowForUser($user);
        }

        $this->output->outputTable($tableRows, $headerRow);
    }
956988
public function users()
    {
        $relation = $this->morphedByMany(
            Models::classname(User::class),
            'entity',
            Models::table('assigned_roles')
        )->withPivot('scope');

        return Models::scope()->applyToRelation($relation);
    }
559195
public function get_selected_users() {
        // Do a lazy load.
        if (is_null($this->selected)) {
            $this->selected = $this->load_selected_users();
        }
        return $this->selected;
    }
1175691
public function index()
    {
        $dataGrid = new UserGroupDataGrid($this->repository->query());

        return view('avored-framework::user.user-group.index')->with('dataGrid', $dataGrid->dataGrid);
    }
361430
public function getIncludeUserIds()
    {
        $userIds = [];
        foreach ($this->portfolio->getPortfolioGuides() as $guide) {
            $userIds[] = $guide->getUser()->getId();
        }

        return $userIds;
    }
250304
public function listAction()
    {
        $groupManager = $this->get('phlexible_user.group_manager');

        $groups = [];
        foreach ($groupManager->findAll() as $group) {
            $members = [];
            foreach ($group->getUsers() as $user) {
                $members[] = $user->getDisplayName();
            }
            sort($members);

            $groups[] = [
                'gid' => $group->getId(),
                'name' => $group->getName(),
                'readonly' => false,
                'memberCnt' => count($members),
                'members' => $members,
            ];
        }

        return new JsonResponse($groups);
    }
505410
public function actionIndex()
    {
        return $this->render('index', [
            'members' => User::find()->orderBy(['id' => SORT_DESC])->limit(10)->all(),
            'posts' => Post::find()->orderBy(['id' => SORT_DESC])->limit(10)->all()
        ]);
    }
708257
public function getUsers()
    {
        $userStorage =  $this->entityTypeManager->getStorage('user');
        $users = $userStorage->loadMultiple();

        $userList = [];
        foreach ($users as $userId => $user) {
            $userList[$userId] = $user->getUsername();
        }

        return $userList;
    }
1268212
public function index()
    {
        return view('address.list', [
            'addresses' => $addresses = Auth::user()->addresses,
            'defaultId' => $addresses->where('default', true)->pluck('id')->first(),
        ]);
    }
228869
protected function askForUsers()
    {
        $default = 0;
        $users = $this->users();
        $user_names = array_merge(
            ['Skip'],
            collect($users)->pluck('name')->toArray()
        );

        $selected_user_names =  $this->choice('Users?', $user_names ,$default, null, true);

        if ($selected_user_names == 0) return null;
        $users = collect($users)->filter(function ($user) use ($selected_user_names) {
            return in_array($user->name,$selected_user_names);
        });

        return $users->pluck('id');
    }