mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-24 01:48:44 +02:00
Design inscription, connexion, calendrier
This commit is contained in:
@ -55,14 +55,13 @@ class LoggingInUser
|
||||
|
||||
public function makeVerifications()
|
||||
{
|
||||
global $URL_BASE;
|
||||
|
||||
ensure(filter_var($this->email, FILTER_VALIDATE_EMAIL), "L'adresse email est invalide.");
|
||||
$this->user = User::fromEmail($this->email);
|
||||
ensure($this->user != null, "Le compte n'existe pas.");
|
||||
ensure($this->user->checkPassword($this->password), "Le mot de passe est incorrect.");
|
||||
if ($this->user->getConfirmEmailToken() != null) {
|
||||
$_SESSION["confirm_email"] = $this->email;
|
||||
/** @noinspection HtmlUnknownTarget */
|
||||
throw new AssertionError("L'adresse mail n'a pas été validée. Veuillez vérifier votre boîte mail (surtout vos spams). "
|
||||
. "<a href=\"/connexion/confirmation-mail\">Cliquez ici pour renvoyer le mail de confirmation</a>.");
|
||||
}
|
||||
@ -125,7 +124,7 @@ class ResetPassword
|
||||
ensure($data !== false, "Il n'y a pas de compte à récupérer avec ce jeton.");
|
||||
$this->user = User::fromId($data["id"]);
|
||||
|
||||
if ($this->password == null)
|
||||
if (!isset($_POST["password"]))
|
||||
return;
|
||||
|
||||
ensure($this->password == $this->confirm_password, "Les deux mots de passe sont différents.");
|
||||
|
@ -4,5 +4,11 @@ unset($_SESSION["user_id"]);
|
||||
session_destroy();
|
||||
|
||||
require_once "server_files/views/header.php";
|
||||
echo "<h2>Déconnexion réussie !</h2>";
|
||||
?>
|
||||
|
||||
<div class="alert alert-success">
|
||||
Déconnexion réussie !
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once "server_files/views/footer.php";
|
||||
|
Reference in New Issue
Block a user