Пример #1
0
 /**
  * Delete user
  *
  * @param integer $id
  */
 public function actionDelete($id)
 {
     $post = $this->request()->post()->get('DELETE');
     if ($id > 0 && $post !== null) {
         if (intval($post['SESSION_ID']) === $this->session()->getId() && $post['ID'] > 0) {
             if (User::delete($post['ID'])) {
                 $this->setFlash(self::FLASH_KEY, $this->trans('user.widgets.user_edit.delete_success'));
                 $this->redirect($this->path_to_list);
             }
         }
     }
 }
Пример #2
0
 /**
  * Delete group
  *
  * @param integer $id
  * @return integer
  */
 protected function delete($id)
 {
     return User::delete($id);
 }