1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 05:42:23 +00:00

Le premier inscrit est administrateur

This commit is contained in:
Yohann D'ANELLO 2020-01-18 17:37:24 +01:00
parent 9213258df4
commit a36a4cc728
2 changed files with 4 additions and 1 deletions

View File

@ -73,6 +73,9 @@ class NewUser
}
}
if (sizeof(User::getAllUsers()) == 0)
$this->role = Role::ADMIN;
$this->confirm_email_token = genRandomPhrase(64);
}

View File

@ -117,7 +117,7 @@
</div>
<?php }
if (getallheaders()["X-Real-Ip"] != "185.230.76.133") {
if (!isset($_SESSION["user"]) && $view != "server_files/controllers/connexion.php") {
echo "<div style=\"text-align: center;\" class=\"alert alert-success\"><h1>Cette plateforme ouvrira le 22 janvier 2020 ! :)</h1></div>";
require_once "footer.php";
}