Skip to content
Extraits de code Groupes Projets
Valider 23949411 rédigé par Etienne BRATEAU's avatar Etienne BRATEAU
Parcourir les fichiers

bug fix

parent 3d63f703
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,16 +13,32 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login'] ...@@ -13,16 +13,32 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login']
{ {
if($_POST['password'] === $_POST['passwd_confc']) if($_POST['password'] === $_POST['passwd_confc'])
{ {
if($_POST['type'] === monitored) if($_POST['type'] === 'monitored')
{
try
{ {
$user = \BackEnd\User\MonitoredUser::addUser($_POST['login'],$_POST['email'],$_POST['password'], $user = \BackEnd\User\MonitoredUser::addUser($_POST['login'],$_POST['email'],$_POST['password'],
$_POST['name'],$_POST['address'], $_POST['tel']); $_POST['name'],$_POST['address'], $_POST['tel']);
} }
else if ($_POST['type'] === supervisor) catch(Exception $e)
{
header('Location: index.php?err=4');
exit;
}
}
else if ($_POST['type'] === 'supervisor')
{
try
{ {
$user = \BackEnd\User\SupervisorUser::addUser($_POST['login'],$_POST['email'],$_POST['password'], $user = \BackEnd\User\SupervisorUser::addUser($_POST['login'],$_POST['email'],$_POST['password'],
$_POST['name'],$_POST['address'], $_POST['tel']); $_POST['name'],$_POST['address'], $_POST['tel']);
} }
catch(Exception $e)
{
header('Location: index.php?err=5');
exit;
}
}
else else
{ {
header('Location: index.php?err=3'); header('Location: index.php?err=3');
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter