Skip to content
Snippets Groups Projects
Commit 4b872013 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Make $authority parameter mandatory for SimpleSAML_Session::doLogout().

parent 8d0d846c
No related branches found
No related tags found
No related merge requests found
......@@ -406,20 +406,12 @@ class SimpleSAML_Session {
*
* This function will call any registered logout handlers before marking the user as logged out.
*
* @param string|NULL $authority The authentication source we are logging out of.
* @param string $authority The authentication source we are logging out of.
*/
public function doLogout($authority = NULL) {
public function doLogout($authority) {
SimpleSAML_Logger::debug('Session: doLogout(' . var_export($authority, TRUE) . ')');
if ($authority === NULL) {
if ($this->authority === NULL) {
SimpleSAML_Logger::debug('Session: No current authsource - not logging out.');
return;
}
$authority = $this->authority;
}
if (!isset($this->authData[$authority])) {
SimpleSAML_Logger::debug('Session: Already logged out of ' . $authority . '.');
return;
......@@ -429,11 +421,8 @@ class SimpleSAML_Session {
$this->callLogoutHandlers($authority);
unset($this->authData[$authority]);
if ($this->authority === $authority) {
$this->authority = NULL;
}
if ($this->authority === NULL && $this->rememberMeExpire) {
if (!$this->isValid($authority) && $this->rememberMeExpire) {
$this->rememberMeExpire = NULL;
$this->updateSessionCookies();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment