Commit bb700cf6 authored by Kevin Duret's avatar Kevin Duret
Browse files

fix logout

parent 25c27a66
......@@ -337,20 +337,8 @@ class CentreonContext extends UtilsContext
{
// LoginPage constructor will automatically throw if we are
// not on the login page.
$logoutUrl = 'http://' . $this->container->getHost() . ':' . $this->container->getPort(80, $this->webService)
. '/centreon/authentication/logout';
$sessionId = $this->getSession()->getDriver()->getCookie('PHPSESSID');
$curlLogout = curl_init($logoutUrl);
curl_setopt($curlLogout, CURLOPT_COOKIE, 'PHPSESSID=' . $sessionId);
curl_setopt($curlLogout, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curlLogout, CURLOPT_TIMEOUT, 5);
curl_setopt($curlLogout, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlLogout, CURLOPT_POST, true);
curl_exec($curlLogout);
curl_close($curlLogout);
return new LoginPage($this, true);
$this->visit('index.php?disconnect=1');
return new LoginPage($this, false);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment