Skip to content
Snippets Groups Projects
Commit 166345c3 authored by Jaime Perez's avatar Jaime Perez Committed by Jaime Perez Crespo
Browse files

Fix SimpleSAML_Session::registerLogoutHandler() to stop using the deprecated $authority property.

parent d1a3b6d3
No related branches found
No related tags found
No related merge requests found
......@@ -506,11 +506,12 @@ class SimpleSAML_Session {
/**
* This function registers a logout handler.
*
* @param string $authority The authority for which register the handler.
* @param string $classname The class which contains the logout handler.
* @param string $functionname The logout handler function.
* @throws Exception If the handler is not a valid function or method.
*/
public function registerLogoutHandler($classname, $functionname) {
public function registerLogoutHandler($authority, $classname, $functionname) {
assert('isset($this->authData[$this->authority])');
$logout_handler = array($classname, $functionname);
......@@ -521,7 +522,7 @@ class SimpleSAML_Session {
}
$this->authData[$this->authority]['LogoutHandlers'][] = $logout_handler;
$this->authData[$authority]['LogoutHandlers'][] = $logout_handler;
$this->dirty = TRUE;
}
......
......@@ -90,7 +90,7 @@ try {
/* Register logout handler. */
$session = SimpleSAML_Session::getSessionFromRequest();
$session->registerLogoutHandler('SimpleSAML_AuthMemCookie', 'logoutHandler');
$session->registerLogoutHandler($sourceId, 'SimpleSAML_AuthMemCookie', 'logoutHandler');
/* Redirect the user back to this page to signal that the login is completed. */
SimpleSAML_Utilities::redirectTrustedURL(SimpleSAML_Utilities::selfURL());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment