mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-26 00:27:32 +02:00
Redesign du site
This commit is contained in:
@ -9,7 +9,7 @@ $user = $_SESSION["user"];
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"])) {
|
||||
if (isset($_POST["update_account"])) {
|
||||
$my_account = new MyAccount($_POST);
|
||||
try {
|
||||
$my_account->makeVerifications();
|
||||
@ -21,7 +21,7 @@ if (isset($_POST["submitted"])) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST["submitted_password"])) {
|
||||
if (isset($_POST["update_password"])) {
|
||||
$new_password = new NewPassword($_POST);
|
||||
try {
|
||||
$new_password->makeVerifications();
|
||||
@ -63,8 +63,10 @@ class MyAccount
|
||||
$keys = ["email", "surname", "first_name", "birth_date", "gender", "address", "postal_code", "city", "country", "phone_number",
|
||||
"school", "class", "responsible_name", "responsible_phone", "responsible_email", "description"];
|
||||
|
||||
if ($this->user->getRole() == Role::PARTICIPANT)
|
||||
$this->class = SchoolClass::fromName($this->class);
|
||||
if ($this->user->getRole() != Role::PARTICIPANT)
|
||||
$this->class = SchoolClass::fromName(strtoupper($this->class));
|
||||
else
|
||||
$this->class = SchoolClass::ADULT;
|
||||
|
||||
foreach ($keys as $key)
|
||||
$this->$key = $this->$key != null && $this->$key != "" ? $this->$key : $this->user->$key;
|
||||
|
Reference in New Issue
Block a user