Beispiel #1
0
 public function remove()
 {
     $params = parent::getParams('POST', array('name'));
     if (empty($params)) {
         return;
     }
     extract($params);
     $cur_id = $this->session->userdata('auid');
     if (!isset($cur_id)) {
         parent::finish(false, '没有权限');
         return;
     }
     if (false === $this->user_model->remove(array('name' => $name, 'auid' => $cur_id))) {
         parent::finish(false, '目标是自己或不存在');
         return;
     }
     parent::finish(true);
 }