The users that were selected.

This is a more sophisticated version of optional_param($this->name, array(), PARAM_INT) that validates the
returned list of ids against the rules for this user selector.

@return array of user objects.
559195
public function get_selected_users() {
        // Do a lazy load.
        if (is_null($this->selected)) {
            $this->selected = $this->load_selected_users();
        }
        return $this->selected;
    }
803141
public function getIds()
    {
        $idsString = $this->getRequest()->get('ids');

        return (null !== $idsString) ? array_filter(explode(',', $idsString)) : null;
    }
625898
public function getQueryParameters() {
        $params = array();
        $params['userId'] = $this->user_id;
        $params['itemId'] = $this->item_id;
        if (isset($this->optional['sessionId']))
            $params['sessionId'] = $this->optional['sessionId'];
        return $params;
    }
979269
public function getAvailableRoles()
    {
        Piwik::checkUserHasSomeAdminAccess();

        $response = array();

        foreach ($this->roleProvider->getAllRoles() as $role) {
            $response[] = array(
                'id' => $role->getId(),
                'name' => $role->getName(),
                'description' => $role->getDescription(),
                'helpUrl' => $role->getHelpUrl(),
            );
        }

        return $response;
    }
1068545
public function options() {
        $options = array();
        foreach ($this->items as $userid => $user) {
            $options[$userid] = fullname($user);
        }

        return $options;
    }
389067
function load_choices() {
        if (is_array($this->choices)) {
            return true;
        }
        list($sort, $sortparams) = users_order_by_sql('u');
        if (!empty($sortparams)) {
            throw new coding_exception('users_order_by_sql returned some query parameters. ' .
                    'This is unexpected, and a problem because there is no way to pass these ' .
                    'parameters to get_users_by_capability. See MDL-34657.');
        }
        $userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
        $users = get_users_by_capability(context_system::instance(), $this->capability, $userfields, $sort);
        $this->choices = array(
            '$@NONE@$' => get_string('nobody'),
            '$@ALL@$' => get_string('everyonewhocan', 'admin', get_capability_string($this->capability)),
        );
        if ($this->includeadmins) {
            $admins = get_admins();
            foreach ($admins as $user) {
                $this->choices[$user->id] = fullname($user);
            }
        }
        if (is_array($users)) {
            foreach ($users as $user) {
                $this->choices[$user->id] = fullname($user);
            }
        }
        return true;
    }
44539
private function getValidOwnerIds()
    {
        $userRepo = $this->repository->getEntityManager()->getRepository(Entity\Users::class);
        $query = $userRepo->createQueryBuilder()
            ->select('id')
            ->where('enabled = :enabled')
            ->setParameter('enabled', true)
        ;
        $userRecords = $query->execute()->fetchAll(\PDO::FETCH_COLUMN);

        return $userRecords;
    }
459338
public function rules()
    {

        //$userRepository = new UserRepository($this->app);
        $user = $this->users->findBy('id', $this->route('user'));

        return [
            'username' => 'required|max:255|unique:users,username,'.$user->id,
            'email' => 'required|email|max:255|unique:users,email,'.$user->id,
        ];
    }
1115353
public function getUsers() : array
    {
        /** @var \Adldap\Query\Builder $query */
        $query = Resolver::query();

        if ($filter = $this->option('filter')) {
            // If the filter option was given, we'll
            // insert it into our search query.
            $query->rawFilter($filter);
        }

        if ($user = $this->argument('user')) {
            $users = [$query->findOrFail($user)];
        } else {
            // Retrieve all users. We'll paginate our search in case we
            // hit the 1000 record hard limit of active directory.
            $users = $query->paginate()->getResults();
        }

        // We need to filter our results to make sure they are
        // only users. In some cases, Contact models may be
        // returned due the possibility of them
        // existing in the same scope.
        return array_filter($users, function ($user) {
            return $user instanceof User;
        });
    }
591805
public function getParams(): array
    {
        $params = [
            'chat_id' => $this->chatId,
            'from_chat_id' => $this->fromChatId,
            'message_id' => $this->messageId
        ];

        if ($this->disableNotification) {
            $params['disable_notification'] = (int)$this->disableNotification;
        }

        return $params;
    }
315130
public function getParams(): array
    {
        $params = [
            'chat_id' => $this->chatId
        ];

        if ($this->parseMode) {
            $params['parse_mode'] = $this->parseMode;
        }

        if ($this->disableWebPagePreview) {
            $params['disable_web_page_preview'] = (int)$this->disableWebPagePreview;
        }

        if ($this->disableNotification !== null) {
            $params['disable_notification'] = (int)$this->disableNotification;
        }

        if ($this->replyToMessageId) {
            $params['reply_to_message_id'] = $this->replyToMessageId;
        }

        return $params;
    }
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');
    }
873807
public function getActiveUsers()
    {
        $data = $this->call('apps/' . $this->appId . '/activeusers', [], 'get');

        $array = [];
        foreach ($data as $msg) {
            $array[] = User::fromResponse($msg);
        }

        return $array;
    }
635600
public function getOptionArray()
    {
        // Prepare the options array
        $options = [];

        // Get the customer id 
        // TODO get from model or user select
        $customerId = 2;

        // Get the cards list
        $cardList = $this->paymentTokenManagement->getListByCustomerId($customerId);

        // Prepare the options list
        foreach ($cardList as $card) {
            // Get the card data
            $cardData = $card->getData();

            // Create the option
            //if ((int) $cardData->is_active == 1 && (int) $cardData->is_visible == 1) {
            if ($cardData) {
                $options[$cardData['gateway_token']] = $this->_getOptionString(json_decode($cardData['details']));
            }
        }

        return $options;
    }
327202
function GetDetailedUsersArray()
  {
      $users_array = array();
      $result = $this->GetNextUserArray(TRUE);
      if (isset($result['user'])) {
          $users_array[$result['user']] = $result;
      }
      do {
          if ($result = $this->GetNextUserArray()) {
              if (isset($result['user'])) {
                  $users_array[$result['user']] = $result;
              }
          }
      } while (FALSE !== $result);
      return $users_array;
  }
1230001
public function getActiveUsers()
    {
        $result = $this->getUsers();
        if ( $result->isSuccess() ) {
            $data = array();
            foreach ($result->data as $obj) {
                /** @var \Harvest\Model\User $obj */
                if ( $obj->get("is-active") == "true" ) {
                    $data[$obj->id] = $obj;
                }
            }
            $result->data = $data;
        }

        return $result;
    }
340871
public function getIncludeUserIds()
    {
        $userIds = array();
        $roleUsers = $this->role->getUsers();
        foreach ($roleUsers as $user) {
            array_push($userIds, $user->getId());
        }
        $roleGroups = $this->role->getGroups();
        foreach ($roleGroups as $group) {
            $userIds = array_merge($userIds, $group->getUserIds());
        }
        $userIds = array_unique($userIds);

        return $userIds;
    }