$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の場合、ユーザーはあなたがintergerにあなたのコードのgroupadmin変数を変更することができ、テストコントローラが、ログインユーザーの両方が、テストコントローライオン認証グループベースのログイン
があなたの 'in_group()'関数のコードを表示し、あなたの参考のために、このURLにアクセスすることができます。 –
私はcodeigniterのためにBen Edmunds Ion Authライブラリを使用しています –