src/Controller/UserController.php
public function DeleteAction()
  {
    // Gets the user id, then stores it
    $id = $_GET['id'];

    // Deletes the selected user
    ModelFactory::get('User')->delete($id);

    // Creates a delete message to confirm the removal of the selected user
    htmlspecialchars(Session::createAlert('User permanently deleted !'));

    // Redirects to the view home
    $this->redirect('home');
  }
public function DeleteAction()
  {
    // Gets the user id, then stores it
    $id = $_GET['id'];

    // Deletes the selected user
    ModelFactory::get('User')->delete($id);

    // Creates a delete message to confirm the removal of the selected user
    htmlspecialchars(Session::createAlert('User permanently deleted !'));

    // Redirects to the view home
    $this->redirect('home');
  }
************\
Deletes a user