1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 19:37:26 +02:00

Amélioration du code de la page de connexion

This commit is contained in:
galaxyoyo
2019-09-09 00:41:52 +02:00
parent fbabdff69c
commit 190039a5e8
15 changed files with 270 additions and 259 deletions

View File

@ -46,10 +46,7 @@ class NewTeam {
public function register() {
global $DB, $YEAR;
$alphabet = "0123456789abcdefghijkmnopqrstuvwxyz0123456789";
$this->access_code = "";
for ($i = 0; $i < 6; ++$i)
$this->access_code .= $alphabet[rand(0, strlen($alphabet) - 1)];
$this->access_code = genRandomPhrase(6);
$req = $DB->prepare("INSERT INTO `teams` (`name`, `trigram`, `tournament`, `encadrant_1`, `participant_1`, `validation_status`, `access_code`, `year`)
VALUES (?, ?, ?, ?, ?, ?, ?, ?);");