-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogout.php
More file actions
26 lines (25 loc) · 749 Bytes
/
logout.php
File metadata and controls
26 lines (25 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
require_once 'config/config.php';
if (isset($_GET['action'])) {
if ($_GET['action'] == 'discord-logout') {
destroyCookiesAndSessions();
if (isset($_GET['reason']) && $_GET['reason'] == 'change') {
header('Location: ./login?action=login&error=access-change');
} else {
header('Location: .');
}
die();
}
if ($_GET['action'] == 'native-logout') {
destroyCookiesAndSessions();
if (isset($_GET['reason']) && $_GET['reason'] == 'change') {
header('Location: ./login?action=login&error=access-change');
} else {
header('Location: .');
}
die();
}
}
destroyCookiesAndSessions();
header('Location: .');
die;