fix logout error logging
This commit is contained in:
1 parent
5305fcabb6
commit
24e11e14a3
1 file changed
+22
-1
+22
-1
@@ -1,3 +1,24 @@
|
||||
<?php
|
||||
include_once(__DIR__ . '/modules/Mail.php');
|
||||
|
||||
session_destroy();
|
||||
try {
|
||||
session_start();
|
||||
|
||||
$_SESSION = array();
|
||||
|
||||
session_destroy();
|
||||
|
||||
http_response_code(200);
|
||||
|
||||
exit();
|
||||
} catch (Exception $e) {
|
||||
http_response_code(500);
|
||||
echo json_encode(['error' => 'An error occurred while logging out.']);
|
||||
sendMail(
|
||||
"[ERROR] Logout",
|
||||
"$e",
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true,
|
||||
);
|
||||
exit();
|
||||
}
|
||||
Reference in new issue
Block a user