1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-27 05:58:46 +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

@ -44,10 +44,7 @@ class NewOrganizer {
public function register() {
global $DB, $YEAR;
$alphabet = "0123456789abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$this->password = "";
for ($i = 0; $i < 16; ++$i)
$this->password .= $alphabet[rand(0, strlen($alphabet) - 1)];
$this->password = genRandomPhrase(16, true);
$req = $DB->prepare("INSERT INTO `users`(`email`, `pwd_hash`, `surname`, `first_name`, `role`, `year`)
VALUES (?, ?, ?, ?, ?, ?);");