Exemplo n.º 1
0
 function actionViewProfil()
 {
     if (isset($_GET['userLogin'])) {
         // load user's profile
         $userLogic = new UsersLogic();
         $user = $userLogic->retrieveUserByLogin($_GET['userLogin']);
         if ($user != null) {
             // Assign variables to the template
             $this->actionTpl->assign('user', $user);
             $this->actionTpl->assign('userfound', true);
             $title = 'Profil de ' . $user->login;
         } else {
             $this->actionTpl->assign('userfound', false);
             $title = 'Utilisateur inconnu';
         }
         $content = new page($this->actionTpl->fetch('templates/user.viewprofile.tpl'), $title);
         // Display the action template into the master template
         $this->display($content);
     } else {
         $this->errorRequete();
         return;
     }
 }
Exemplo n.º 2
0
 function actionDelUser()
 {
     $usersLogic = new UsersLogic();
     $user = $usersLogic->retrieveUserById($_GET['iduser']);
     $user->delete();
     $this->forward('manageUsers');
     return;
 }