Example #1
0
 /**
  * Executes any command triggered on the admin page. 
  */
 protected function processAdminCommand()
 {
     if (isset($_POST['command'], $_POST['id']) && $_POST['command'] === 'delete') {
         UserService::loadModel($_POST['id'])->delete();
         // reload the current page to avoid duplicated delete actions
         $this->refresh();
     }
 }