Exemplo n.º 1
0
 public function check_param($param_name)
 {
     $val = $this->input->get_post($param_name, TRUE);
     if (!isset($val)) {
         ishow_error('No param \'' . $param_name . '\'', 'You should provide \'' . $param_name . '\' as a parameter', 400);
     }
     return $val;
 }
Exemplo n.º 2
0
 public function grant()
 {
     $this->check_state_common('GET', TRUE);
     $uid = get_session_uid();
     if (!isset($uid) || $uid != 1) {
         ishow_error('Forbidden', 'Not Super User', 403);
     }
     $this->load->api('user_api');
     $api_result = $this->user_api->get_all_user_by_super($uid);
     if (is_ok_result($api_result)) {
         $this->grant_users = $api_result['data'];
     }
     $this->load->view('admin/user/grant', $this);
 }