Sets the total number of users

@param int $totalusers
177823
public function set_total_users($totalusers) {
        $this->totalusers = $totalusers;
        $this->pages = ceil($this->totalusers / $this->perpage);
        if ($this->page > $this->pages) {
            $this->page = $this->pages;
        }
    }
356422
public function setTotal($value)
    {
        if (!StaticValidator::isValid('number', $value)) {
            return $this;
        }

        $this->_total = StaticFilter::filter('number',$value);
        $this->_pages = ceil($this->_total / $this->_rowsPerPage);
        return $this;
    }
1198980
public function setSTSLifetime(int $seconds)
    {
        $seconds = $seconds;

        if ($seconds >= 900 && $seconds <= 3600) {
            $this->stsLifetime = $seconds;
        }
    }
139489
public void setUsers(java.util.Collection<TraceUser> users) {
        if (users == null) {
            this.users = null;
            return;
        }

        this.users = new java.util.ArrayList<TraceUser>(users);
    }
483727
public function setUserStat(\Dacorp\ExtraBundle\Entity\UserStat $userStat = null)
    {
        $this->userStat = $userStat;
    
        return $this;
    }
1349340
public function setUsers(&$var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->users = $arr;
    }
785176
public function get_total_users() {
        global $DB;
        if ($this->totalusers === null) {
            list($instancessql, $params, $filter) = $this->get_instance_sql();
            list($filtersql, $moreparams) = $this->get_filter_sql();
            $params += $moreparams;
            $sqltotal = "SELECT COUNT(DISTINCT u.id)
                           FROM {user} u
                           JOIN {user_enrolments} ue ON (ue.userid = u.id  AND ue.enrolid $instancessql)
                           JOIN {enrol} e ON (e.id = ue.enrolid)";
            if ($this->groupfilter) {
                $sqltotal .= " LEFT JOIN ({groups_members} gm JOIN {groups} g ON (g.id = gm.groupid))
                                         ON (u.id = gm.userid AND g.courseid = e.courseid)";
            }
            $sqltotal .= "WHERE $filtersql";
            $this->totalusers = (int)$DB->count_records_sql($sqltotal, $params);
        }
        return $this->totalusers;
    }
79270
public static function counting(string $name, int $hit, $total = null)
    {
        self::getLogger()->counting($name, $hit, $total);
    }
1202827
public function setDn($username, $nosub = 0)
	{
		if ($this->users_dn == '' || $nosub)
		{
			$this->dn = $username;
		}
		elseif (\strlen($username))
		{
			$this->dn = str_replace('[username]', $username, $this->users_dn);
		}
		else
		{
			$this->dn = '';
		}
	}
383349
public function SetCounts(&$Data) {
      $CountUsers = $this->SQL
         ->Select('UserID', 'count', 'CountUsers')
         ->From('User u')
         ->Where($this->BanWhere($Data))
         ->Get()->Value('CountUsers', 0);

      $Data['CountUsers'] = $CountUsers;
   }
398490
private function setTotalCount(ResultSet $result): void
    {
        $this->totalCount = $result->getTotalCount() - $this->startingOffset;
        $this->totalCount = $this->totalCount > 0 ? $this->totalCount : 0;

        if ($this->maxTotalCount !== null && $this->totalCount >= $this->maxTotalCount) {
            $this->totalCount = $this->maxTotalCount;
        }
    }
867405
public function setCurrentUser($currentUser)
    {
        $this->currentUser = $currentUser;
        if ($this->currentUser) {
            // removes stored user as it's now useless
            $this->user = null;
        }
    }
1316157
public function set_count($try, $count) {
        $this->totalcount = $this->totalcount + $count;
        $this->trycount[$try] = $count;
    }
82459
public function setPortfolioUsers($portfolioUsers)
    {
        foreach ($portfolioUsers as $portfolioUser) {
            $portfolioUser->setPortfolio($this);
        }

        $this->portfolioUsers = $portfolioUsers;

        return $this;
    }
910312
protected function setUser()
    {
        $this->uid = $this->getParam('u', null);

        if (isset($this->uid)) {

            $this->current_user = $this->user->get($this->uid);

            if (empty($this->current_user['status'])) {
                $this->errorAndExit($this->text('No access'));
            }
        }
    }
1111903
public function setNumTotalResults( $total )
	{
		$total = (int)$total;
		if ( $total < 0 )
		{
			trigger_error( 'Pagination setNumTotalResults: Total must be positive.' );
			return false;
		}

		$this->items_total = $total;
	}
705282
public function setTotal($total)
    {
        NumericValidator::validate($total, "Total");
        $total = Formatter::formatToPrice($total, $this->getCurrency());
        $this->total = $total;
        return $this;
    }