1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-25 05:40:30 +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

@ -31,6 +31,9 @@ class JoinTeam
public function makeVerifications()
{
global $CONFIG;
ensure(date("Y-m-d H:i:s") < $CONFIG->getInscriptionDate(), "La date limite d'inscription est dépassée.");
ensure(preg_match("#[a-z0-9]{6}#", $this->access_code), "Le code d'accès doit comporter 6 caractères alphanumériques.");
ensure($this->team != null, "Ce code d'accès est invalide.");
ensure($this->team->getValidationStatus() == ValidationStatus::NOT_READY, "Cette équipe est déjà validée ou en cours de validation, vous ne pouvez pas la rejoindre.");