Php 基于ion身份验证组的登录

Php 基于ion身份验证组的登录,php,codeigniter,ion-auth,Php,Codeigniter,Ion Auth,如果组id=1,则用户重定向仪表板和组id=2,则用户重定向测试控制器,但都是登录用户重定向测试控制器您只能在INTEGER中更改代码groupadmin变量 $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 pag

如果组id=1,则用户重定向仪表板和组id=2,则用户重定向测试控制器,但都是登录用户重定向测试控制器

您只能在INTEGER中更改代码groupadmin变量

$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');
} 

您可以访问此url以供参考

您只能在INTEGER中更改代码groupadmin变量

$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');
} 

您可以访问此url以供参考

在组()中显示您的
功能代码。我正在使用Ben Edmunds Ion Auth library for CodeIgniter在组()中显示您的
功能代码。我正在使用Ben Edmunds Ion Auth library for CodeIgniter请批准此答案,因为它对其他人有帮助。对参考链接投了赞成票。遗憾的是,此答案未被接受。请批准此答案,因为它可能对其他人有帮助。对参考链接投了赞成票。可惜这个答案不被接受