$groupadmin ='1';
if ($this->ion_auth->in_group($groupadmin))
{
$this->session->set_flashdata('message', 'You must be part of the group 1 to view this page');
redirect('dashboard');
}else
{
$this->session->set_flashdata('message', 'You must be part of the group 2 to view this page');
redirect('test');
}
경우 그룹 id = 1 다음 사용자 리디렉션 대시 보드와 그룹 ID = 2 다음 사용자 테스트 컨트롤러하지만 모두 로그인 사용자 리디렉션 테스트 컨트롤러이온 인증 그룹 기반 로그인
이'in_group() '함수 코드를보기 참조 용으로이 URL을 방문 할 수 있습니다. –
나는 codeigniter에 Ben Edmunds Ion Auth 라이브러리를 사용하고 있습니다. –