Sélectionner une révision Git

Etienne BRATEAU authored
login_backend.php 832 o
<?php
require_once 'class/BackEnd/User/monitoreduser.class.php';
require_once 'class/BackEnd/User/supervisoruser.class.php';
session_start();
if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login']) && !empty($_POST['password']))
{
try
{
$user= new \BackEnd\User\MonitoredUser('login', $_POST['login']);
if ($user->getPassword() === $_POST['password'])
{
$_SESSION['login']=$user->getLogin();
}
}
catch(Exception $e)
{
try
{
$user= new \BackEnd\User\SupervisorUser('login', $_POST['login']);
if ($user->getPassword === $_POST['password'])
{
$_SESSION['login']=$user->getLogin();
}
}
catch(Exception $e){
header('Location: index.php?err=2');
}
header('Location: index.php');
}
header('Location: index.php');
} else
{
header('Location: index.php?err=1');
}