1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-24 23:40:29 +02:00

Pas d'inscription possible après la date limite

This commit is contained in:
galaxyoyo
2019-09-12 18:47:57 +02:00
parent 1edc2cbd60
commit 4926539e25
11 changed files with 153 additions and 128 deletions

View File

@ -37,6 +37,9 @@ class NewUser
public function makeVerifications()
{
global $CONFIG;
ensure(date("Y-m-d H:i:s") < $CONFIG->getInscriptionDate(), "Les inscriptions sont terminées.");
ensure(filter_var($this->email, FILTER_VALIDATE_EMAIL), "L'adresse e-mail entrée est invalide.");
$this->email = strtolower($this->email);
ensure(!userExists($this->email), "Un compte existe déjà avec cette adresse e-mail.");