Add some checks before adding the user in the base
This commit is contained in:
parent
36a57c9bc0
commit
a74e9778d5
2 changed files with 14 additions and 5 deletions
|
|
@ -4,14 +4,14 @@ include("User.class.php");
|
|||
|
||||
$users = User::getUsers();
|
||||
|
||||
if (in_array($_GET['id'], $users))
|
||||
if (!array_key_exists($_GET['id'], $users))
|
||||
{
|
||||
echo "Cet utilisateur n'existe pas";
|
||||
echo "Cet utilisateur n'existe pas !";
|
||||
}
|
||||
else
|
||||
{
|
||||
$users[$_GET['id']]->set_validated(true);
|
||||
echo "Utilisateur confirmé !"
|
||||
echo "Utilisateur confirmé !";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Reference in a new issue