private function get_target_user() {

        if (!$this->fixeddataset) {
            $userid = $this->userids[rand(1, self::$paramusers[$this->size])];
        } else if ($userid = current($this->userids)) {
            // Moving pointer to the next user.
            next($this->userids);
        } else {
            // Returning to the beginning if we reached the end.
            $userid = reset($this->userids);
        }

        return $userid;
    }
private function get_target_user() {

        if (!$this->fixeddataset) {
            $userid = $this->userids[rand(1, self::$paramusers[$this->size])];
        } else if ($userid = current($this->userids)) {
            // Moving pointer to the next user.
            next($this->userids);
        } else {
            // Returning to the beginning if we reached the end.
            $userid = reset($this->userids);
        }

        return $userid;
    }
private function get_target_user ( ) { if ( ! $ this -> fixeddataset ) { $ userid = $ this -> userids [ rand ( 1 , self :: $ paramusers [ $ this -> size ] ) ] ; } else if ( $ userid = current ( $ this -> userids ) ) { // Moving pointer to the next user. next ( $ this -> userids ) ; } else { // Returning to the beginning if we reached the end. $ userid = reset ( $ this -> userids ) ; } return $ userid ; }
Gets a user id.

Depends on $this->fixeddataset.

@return int A user id for a random created user
Gets a user id .