class Controller_Main extends Controller {
private $user_group_id = 1;
private $admin_group_id = 100;
public function action_index() {
if (Auth::check()) {
$view = View::forge('main/index');
if (Auth::member($this->user_group_id)) {
$view->user_type = 'member';
return $view;
}
elseif (Auth::member($this->admin_group_id)) {
$view->user_type = 'admin';
return $view;
}
}
else return Response::forge(View::forge('main/index'));
}
public function action_404() {
return Response::forge(Presenter::forge('main/404'), 404);
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!