mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-25 09:00:34 +02:00
Début de gestion des mails et quelques modifications
This commit is contained in:
@ -44,13 +44,6 @@ function loadUserValues() {
|
||||
}
|
||||
}
|
||||
|
||||
function echoDate($date = NULL, $with_time = false) {
|
||||
if ($date == NULL)
|
||||
$date = date("yyyy-mm-dd");
|
||||
|
||||
return strftime("%d %B %G" . ($with_time ? " %H:%M" : ""), strtotime($date));
|
||||
}
|
||||
|
||||
function quitTeam() {
|
||||
global $DB, $URL_BASE;
|
||||
|
||||
@ -96,7 +89,10 @@ function quitTeam() {
|
||||
unset($_SESSION["team"]);
|
||||
}
|
||||
|
||||
function ensure($bool, $error_msg = "") {
|
||||
if (!$bool)
|
||||
throw new AssertionError($error_msg);
|
||||
function userExists($email) {
|
||||
global $DB, $YEAR;
|
||||
|
||||
$req = $DB->prepare("SELECT `email` FROM `users` WHERE `email` = ? AND `year` = '$YEAR';");
|
||||
$req->execute([$email]);
|
||||
return !$req->fetch();
|
||||
}
|
Reference in New Issue
Block a user