private function logoutAction()
 {
     $oUser = UserManager::getCurrent();
     if ($oUser) {
         UserManager::logout($oUser);
     }
     $this->homeAction();
 }
 private function commentAction()
 {
     $name = $_POST['name'];
     $comment = $_POST['comment'];
     $iMark = $_POST['stars'];
     $productId = $_POST['product-id'];
     $oProduct = ProductManager::get($productId);
     $oUser = UserManager::getCurrent();
     $oComment = new Comment();
     $oComment->setDate(date('Y-m-d H:i:s'));
     $oComment->setMark($iMark);
     $oComment->setName($name);
     $oComment->setComment($comment);
     $oComment->setProduct($oProduct);
     $oComment->setUser($oUser);
     try {
         $result = CommentManager::create($oComment);
     } catch (\Exception $e) {
         $result = $e->getMessage();
     }
     echo $result;
 }
                            <li><a href="<?php 
    echo $oMenuCategory->getUrl();
    ?>
"><span
                                class="glyphicon glyphicon-tag"></span>&nbsp;<?php 
    echo $oMenuCategory->getName();
    ?>
                            </a>
                            </li>
                            <?php 
}
?>
                        </ul>
                </li>
                <?php 
if (array_key_exists('email', $_SESSION) && UserManager::getCurrent()->getRole() == 2) {
    ?>
                <li class="dropdown">
                    <a href="index.php?page=account&action=backoffice" class="dropdown-toggle" data-toggle="dropdown"><span
                        class="glyphicon glyphicon-cog"></span>&nbsp;&nbsp;Back office <span
                        class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="index.php?page=category&action=list"><span
                                class="glyphicon glyphicon-list"></span>&nbsp; Catégories
                            </a>
                            </li>
                            <li><a href="index.php?page=product&action=list"><span
                                class="glyphicon glyphicon-list"></span>&nbsp; Produits
                            </a>
                            </li>
                            <li><a href="index.php?page=category&action=stats"><span
 private function myordersAction()
 {
     $oUser = UserManager::getCurrent();
     if (!$oUser) {
         $this->homeAction();
     }
     $aAllOrders = OrderManager::getAllOrders($oUser);
     require ROOT . 'src/ecommerce/view/myorders.php';
 }