Exemplo n.º 1
0
 public function action_index()
 {
     if (\Auth\Auth::member(6)) {
         $data['usuarios'] = \Auth\Model\Auth_Group::find(5)->users;
         $data['texts'] = Model_Text::find('all', ['related' => ['user']]);
     } else {
         $data['texts'] = Model_Text::find('all', ['related' => ['user'], 'where' => ['user_id' => $this->get_current_user_id()]]);
         $data['usuarios'] = \Auth\Model\Auth_Group::find(5)->users;
     }
     $this->template->title = "Texts";
     $this->template->content = View::forge('admin/text/index', $data);
 }