Migrated IDE platform; accepting nonexisting diffs to make IDE happy
This commit is contained in:
@ -1,19 +1,27 @@
|
||||
<?php
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
|
||||
include_once('../include/lucidAuth.functions.php');
|
||||
|
||||
if (!empty($_COOKIE['JWT']) && validateToken($_COOKIE['JWT'])['status'] === "Success") {
|
||||
include_once('../include/lucidAuth.template.php');
|
||||
|
||||
echo sprintf($pageLayout['full'], $contentLayout['manage']);
|
||||
} else {
|
||||
// No cookie containing valid authentication token found;
|
||||
// explicitly deleting any remaining cookie, then redirecting to loginpage
|
||||
setcookie('JWT', FALSE);
|
||||
|
||||
header("HTTP/1.1 401 Unauthorized");
|
||||
header("Location: lucidAuth.login.php");
|
||||
}
|
||||
|
||||
<?php
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
|
||||
include_once('../include/lucidAuth.functions.php');
|
||||
|
||||
if (!empty($_COOKIE['JWT'])) {
|
||||
$validateTokenResult = validateToken($_COOKIE['JWT']);
|
||||
}
|
||||
|
||||
if ($validateTokenResult['status'] === "Success") {
|
||||
include_once('../include/lucidAuth.template.php');
|
||||
|
||||
echo sprintf($pageLayout['full'],
|
||||
sprintf($contentLayout['manage'],
|
||||
$validateTokenResult['name']
|
||||
)
|
||||
);
|
||||
} else {
|
||||
// No cookie containing valid authentication token found;
|
||||
// explicitly deleting any remaining cookie, then redirecting to loginpage
|
||||
setcookie('JWT', FALSE);
|
||||
|
||||
header("HTTP/1.1 401 Unauthorized");
|
||||
header("Location: lucidAuth.login.php");
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user