chore: version inicial del codigo fuente del LMS Estafeta
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
require_once ("../config.php");
|
||||
try {
|
||||
session_name($CFG->sessionname);
|
||||
session_start();
|
||||
unset($_SESSION['usersession']);
|
||||
session_unset();
|
||||
// Stores in Array
|
||||
$_SESSION = array();
|
||||
// Swipe via memory
|
||||
if (ini_get("session.use_cookies")) {
|
||||
// Prepare and swipe cookies
|
||||
$params = session_get_cookie_params();
|
||||
// clear cookies and sessions
|
||||
setcookie(session_name(), '', time() - 42000,
|
||||
$params["path"], $params["domain"],
|
||||
$params["secure"], $params["httponly"]
|
||||
);
|
||||
}
|
||||
// IF THE SESSION IS KEPT IN COOKIE, FORCE SESSION COOKIE TO EXPIRE
|
||||
$cookie_expires = time() - 42000;
|
||||
if (isset($_COOKIE[session_name()]))
|
||||
{
|
||||
setcookie(session_name(), '', $cookie_expires, '/');
|
||||
}
|
||||
// Just in case.. swipe these values too
|
||||
ini_set('session.gc_max_lifetime', 0);
|
||||
ini_set('session.gc_probability', 1);
|
||||
ini_set('session.gc_divisor', 1);
|
||||
// Completely destory our server sessions..
|
||||
session_destroy();
|
||||
session_write_close();
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
} finally {
|
||||
|
||||
header("Location:".$CFG->wwwroot);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user