✨ Add Sentry (#127)
Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit was merged in pull request #127.
This commit is contained in:
@@ -7,6 +7,15 @@ require_once __DIR__ . "/../vendor/autoload.php";
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . "/..");
|
||||
$dotenv->load();
|
||||
|
||||
// Custom functions
|
||||
require_once __DIR__ . "/app_functions.php";
|
||||
|
||||
// Sentry
|
||||
Sentry\init([
|
||||
'dsn' => 'https://8d8f4632fe3e4ec9b005a1b60b660ba5@o435706.ingest.sentry.io/5395475',
|
||||
'release' => get_version(),
|
||||
]);
|
||||
|
||||
// Database auto-generation
|
||||
if (file_exists("/../includes/install.php")) {
|
||||
return;
|
||||
@@ -34,25 +43,3 @@ if ($_ENV['OIDC_DISABLE_SSL'] == "true") {
|
||||
$oidc->setVerifyHost(false);
|
||||
$oidc->setVerifyPeer(false);
|
||||
}
|
||||
|
||||
|
||||
// Custom functions
|
||||
|
||||
require_once __DIR__ . "/app_functions.php";
|
||||
|
||||
function oidc_set_vars($sub, $uid, $fname, $lname, $email) {
|
||||
$_SESSION['uuid'] = $sub;
|
||||
$_SESSION['username'] = $uid;
|
||||
$_SESSION['given_name'] = $fname;
|
||||
$_SESSION['family_name'] = $lname;
|
||||
$_SESSION['full_name'] = $fname . " " . $lname;
|
||||
$_SESSION['email'] = $email;
|
||||
}
|
||||
|
||||
function is_signed_in() {
|
||||
if (isset($_SESSION['is_signed_in'])) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user