$username], 'id')[0]; if (checkPassword($id, $_POST['password']) !== true) output(403, 'Connexion impossible : clé de passe invalide.'); if (outdatedPasswordHash($id)) changePassword($id, $_POST['password']); stopSession(); startSession(); $_SESSION['id'] = $id; $_SESSION['type'] = query('select', 'users', ['id' => $id], 'type')[0]; setupDisplayUsername($_POST['username']); redir();