mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
b9ddb2d5ea
Author: Martin Langhoff <martin@catalyst.net.nz>
15 lines
495 B
PHP
15 lines
495 B
PHP
<?php
|
|
// $Id$
|
|
// logout the user from CAS server (destroy the ticket)
|
|
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
|
|
|
|
global $CFG;
|
|
if ($CFG->cas_logout) {
|
|
require_once($CFG->dirroot.'/config.php');
|
|
include_once($CFG->dirroot.'/lib/cas/CAS.php');
|
|
phpCAS::client($CFG->cas_version,$CFG->cas_hostname,(int)$CFG->cas_port,$CFG->cas_baseuri);
|
|
$backurl = $CFG->wwwroot;
|
|
phpCAS::logout($backurl);
|
|
}
|
|
|
|
?>
|