* 🐛 User not added to DB - force die() on error (#118)

* 🐛 User not added to DB - force die() on error

Signed-off-by: Luke Tainton <luke@tainton.uk>

* Restyled by php-cs-fixer (#119)

Co-authored-by: Restyled.io <commits@restyled.io>

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>

* Fixing Login Die

* Broken login (#121)

* Fixing Login Die

* Fix Broken Login 2

* Broken login (#122)

* Fixing Login Die

* Fix Broken Login 2

* Update footer

* Try Somethin New Today

* Move break rule in footer (#124)

* Update footer.php

* Change line break to pipe

* Remove full stop

Co-authored-by: Alexander Davis <alex@adcm.uk>

*  Add Sentry (#127)

Signed-off-by: Luke Tainton <luke@tainton.uk>

* 🚧 Migrate from Sentry to GlitchTip (#129)

Signed-off-by: Luke Tainton <luke@tainton.uk>

* 🐛 Move opening and closing 'main' tags (#132)

* 🐛 Move opening and closing 'main' tags

Signed-off-by: Luke Tainton <luke@tainton.uk>

* Restyled by php-cs-fixer (#133)

Co-authored-by: Restyled.io <commits@restyled.io>

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>

Co-authored-by: Luke Tainton <luke@tainton.uk>
Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
This commit was merged in pull request #134.
This commit is contained in:
Alexander Davis
2020-09-01 01:54:06 +01:00
committed by GitHub
parent 7a4a1074c5
commit 26da6e7616
9 changed files with 1905 additions and 90 deletions

View File

@@ -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://7c4607ed5e804d08926cc0bbc0d3fbe9@app.glitchtip.com/59',
'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;
}
}