0
현재 CodeIgniter 및 IonAuth 프로젝트에서 작업 중이며이 문제가 발생했습니다.CodeIgniter 및 IonAuth '사용자가 로그인 한 경우'
시나리오 : 로그인 할 때 로그인 페이지에 계속 액세스 할 수 있습니다. 사용자가 이미 로그인되어 있기 때문에 내가하고 싶은이 액세스를 제거하는 것입니다
이 내 인증 클래스 내 인덱스 방법된다.
function index(){
if (!$this->ion_auth->logged_in())
{
//redirect them to the login page
redirect('auth/login', 'refresh');
}
elseif($this->ion_auth->logged_in())
{
//redirect them to the index page if logged in
redirect('/', 'refresh');
}
elseif (!$this->ion_auth->is_admin())
{
//redirect them to the home page because they must be an administrator to view this
redirect($this->config->item('base_url'), 'refresh');
}
}
어떤 아이디어가 좋지 않을까!
응답 주셔서 감사합니다! 빨리 확인해 볼게! – yowza
고마워, 너 정말 나를 많이 도와 줬어! Stay Awesome! – yowza