Exemplo n.º 1
0
 public function handleDeleteUser($user_id)
 {
     $this->onBeforeRestrictedFunctionality($this);
     try {
         $this->users->delete($this->users->findOneBy(['id' => $user_id]));
         $this->flashMessage('Uživatel byl úspěšně smazán.', 'success');
     } catch (\Exception $exc) {
         $this->flashMessage($exc->getMessage(), 'danger');
     }
     $this->redirect('this');
 }