hi to all i have a question on how can i redirect my groups in the different pages
example: i have ser groups, called user1,user2,user3
user1 will go to main/view1
user2 will go to main/view2
user3 will go to main/view3
this is my ion auth controller:
function index()
{
if (!$this->ion_auth->logged_in())
{
//redirect them to the login page
redirect('auth/login', 'refresh');
}
elseif (!$this->ion_auth->is_admin())
{
//redirect them to the home page because they must be an administrator to view this
redirect('/', 'refresh');
}
else
{
//set the flash data error message if there is one
$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');
//list the users
$this->data['users'] = $this->ion_auth->users()->result();
foreach ($this->data['users'] as $k => $user)
{
$this->data['users'][$k]->groups = $this->ion_auth->get_users_groups($user->id)->result();
}
$this->_render_page('auth/index', $this->data);
}