Skip to content
Snippets Groups Projects
Commit 82e34a0a authored by Balazs Varga's avatar Balazs Varga
Browse files

create proper logout link

parent b40dc3d7
Branches master
No related tags found
No related merge requests found
...@@ -300,7 +300,7 @@ function ShibLinkAdd(&$personal_urls, $title) ...@@ -300,7 +300,7 @@ function ShibLinkAdd(&$personal_urls, $title)
$personal_urls['SSOlogin'] = array( $personal_urls['SSOlogin'] = array(
'text' => $shib_LoginHint, 'text' => $shib_LoginHint,
'href' => ($shib_Https ? 'https' : 'http') .'://' . $_SERVER['HTTP_HOST'] . 'href' => ($shib_Https ? 'https' : 'http') .'://' . $_SERVER['HTTP_HOST'] .
$shib_AssertionConsumerServiceURL . "/" . $shib_ConsumerPrefix . $shib_WAYF . $shib_AssertionConsumerServiceURL . "/" . $shib_ConsumerPrefix . "Login" .
'?target=' . (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '?target=' . (isset($_SERVER['HTTPS']) ? 'https' : 'http') .
'://' . $_SERVER['HTTP_HOST'] . $pageurl, ); '://' . $_SERVER['HTTP_HOST'] . $pageurl, );
return true; return true;
...@@ -309,14 +309,17 @@ function ShibLinkAdd(&$personal_urls, $title) ...@@ -309,14 +309,17 @@ function ShibLinkAdd(&$personal_urls, $title)
/* Kill logout link */ /* Kill logout link */
function ShibActive(&$personal_urls, $title) function ShibActive(&$personal_urls, $title)
{ {
global $shib_logout; global $shib_LogoutHint, $shib_Https, $shib_AssertionConsumerServiceURL;
global $shib_RN; global $shib_RN;
global $shib_map_info; global $shib_map_info;
if($shib_logout == null) $personal_urls['logout'] = array(
$personal_urls['logout'] = null; 'text' => $shib_LogoutHint,
else 'href' => ($shib_Https ? 'https' : 'http') .'://' . $_SERVER['HTTP_HOST'] .
$personal_urls['logout']['href'] = $shib_logout; $shib_AssertionConsumerServiceURL . "/Logout" .
'?return=' . (isset($_SERVER['HTTPS']) ? 'https' : 'http') .
'://'. $_SERVER['HTTP_HOST']. "/index.php?title=Special:UserLogout&returnto=" .
$title->getPartialURL());
if ($shib_RN && $shib_map_info) if ($shib_RN && $shib_map_info)
$personal_urls['userpage']['text'] = $shib_RN; $personal_urls['userpage']['text'] = $shib_RN;
......
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