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:
@ -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 (?, ?, ?, ?, ?, ?);");
|
||||
|
Reference in New Issue
Block a user