X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FComet%2Fbayeux.class.inc.php;h=39ad8a8fc6aa15c0d6b130df382f444fbeb9c97e;hb=fb32108707d84b2b63d17e60661f220e6f707350;hp=785d3e3935add458a7e730fdd44be10a06ae6afa;hpb=262dbeac787ad3aecb28c470484eb3fc8d036d93;p=quix0rs-gnu-social.git diff --git a/plugins/Comet/bayeux.class.inc.php b/plugins/Comet/bayeux.class.inc.php index 785d3e3935..39ad8a8fc6 100644 --- a/plugins/Comet/bayeux.class.inc.php +++ b/plugins/Comet/bayeux.class.inc.php @@ -26,9 +26,12 @@ class Bayeux private $oCurl = ''; private $nNextId = 0; + private $sUser = ''; + private $sPassword = ''; + public $sUrl = ''; - function __construct($sUrl) + function __construct($sUrl, $sUser='', $sPassword='') { $this->sUrl = $sUrl; @@ -43,6 +46,10 @@ class Bayeux curl_setopt($this->oCurl, CURLOPT_POST, 1); curl_setopt($this->oCurl, CURLOPT_RETURNTRANSFER,1); + if (!is_null($sUser) && mb_strlen($sUser) > 0) { + curl_setopt($this->oCurl, CURLOPT_USERPWD,"$sUser:$sPassword"); + } + $this->handShake(); }