src/Net/URL2.php
public function setUserinfo($userinfo, $password = false)
    {
        if ($password !== false) {
            $userinfo .= ':' . $password;
        }
        $this->_userinfo = $this->_encodeData($userinfo);
        return $this;
    }
public function setUserinfo($userinfo, $password = false)
    {
        if ($password !== false) {
            $userinfo .= ':' . $password;
        }
        $this->_userinfo = $this->_encodeData($userinfo);
        return $this;
    }
Sets the userinfo part. If two arguments are passed, they are combined
in the userinfo part as username ":" password.

@param string|bool $userinfo userinfo or username
@param string|bool $password optional password, or false

@return $this