Как показать шаблон по логину пользователя по группам и как ограничить доступ к контроллеру по группам пользователей.
Мой контроллер:
public function index()
{
if (!$this->ion_auth->in_group('admin'))
{
$this->template->administrator('dashboard/dashboard');
}
elseif (!$this->ion_auth->in_group('2'))
{
$this->template->admin('dashboard/dashboard');
}
elseif (!$this->ion_auth->in_group('3'))
{
$this->template->user('dashboard/dashboard');
}
elseif (!$this->ion_auth->in_group('members'))
{
$this->template->client('dashboard/dashboard');
}
else
{
redirect('account/sign_in', 'refresh');
}
}