Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions CASAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ function casLogin($user) {
if ($returnto) {
$target = Title::newFromText($returnto);
if ($target) {
//action=purge is used to purge the cache
$wgOut->redirect($target->getFullUrl('action=purge'));
$wgOut->redirect($target->getFullUrl());
}
}
}
Expand Down Expand Up @@ -226,8 +225,11 @@ function casPrefs($user, &$preferences) {
function casPostAuth($ticket2logout) {

// remember the current session name and id
$old_session_name=session_name();
$old_session_id=session_id();
$session = MediaWiki\Session\SessionManager::getGlobalSession();
$session->clear();
return;
// $old_session_name=$session->getName();
$old_session_id=$session->getId();

// close the current session for now
session_write_close();
Expand Down Expand Up @@ -297,7 +299,8 @@ function casSetup() {
global $casIsSetUp;

// Make the session persistent so that phpCAS doesn't change the session id
wfSetupSession();
$session = MediaWiki\Session\SessionManager::getGlobalSession();
$session->persist();

require_once($CASAuth["phpCAS"]."/CAS.php");
phpCAS::client($CASAuth["Version"], $CASAuth["Server"], $CASAuth["Port"], $CASAuth["Url"], false);
Expand Down