]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blob - api/timeout.php
Users: Scratch the "Secure" column, as it's less useful nowadays that
[irc/unrealircd/unrealircd-webpanel.git] / api / timeout.php
1 <?php
2
3 include "../inc/defines.php";
4 session_start();
5 //timeout after 10 mins of inactivity
6 if (isset($_SESSION["id"]) && isset($_SESSION["last-activity"]) && time() - $_SESSION["last-activity"] < $_SESSION['session_timeout'])
7 die(json_encode(['session' => 'active']));
8 else
9 {
10 session_destroy();
11 die(json_encode(['session' => 'none']));
12 }