Broken login (#121)

* Fixing Login Die

* Fix Broken Login 2
This commit was merged in pull request #121.
This commit is contained in:
Alexander Davis
2020-08-17 16:48:13 +01:00
committed by GitHub
parent 57faf21a67
commit 49581da52c
2 changed files with 3 additions and 3 deletions

View File

@@ -1,9 +1,9 @@
<footer class="footer mt-auto py-3">
<div class="text-center text-muted">
<?php
echo($_ENV['APP_NAME'] . " " . get_version());
echo($_ENV['APP_NAME'] . " " . get_version() . ".<br>");
if ($_ENV['APP_NAME'] != "FHeD") {
echo(", powered by FHeD");
echo("Powered by FHeD.");
};
?><br>
<?php if (is_signed_in()) {

View File

@@ -17,7 +17,7 @@
$alert = array("danger", "Error during OpenID Connect authentication: " . $e->getMessage());
}
if (!user_exists($db, $uuid)) {
if (user_exists($db, $oidc_user['sub']) == false) {
// User doesn't already exist
try {
$stmt = "INSERT INTO users (uuid, uid, given_name, family_name, email) VALUES (:sub, :username, :given, :family, :email)";