I am building a website and am new to Codeigniter and Ion Auth. My website consists of three tiers of user: regular user, moderator and admin. I understand is_admin and is_logged in, but can't figure out how to create a new group for my moderators.
Ideally, I would like to use something like this to protect my moderator pages:
if (!$this->ion_auth->in_group('moderator'))
{
//redirect them to the home page because they must be an administrator to view this
redirect($this->config->item('base_url'), 'refresh');
}
How can I create a new group of user for my moderators? Is it something I need to do in my database? I've seen code in the documentation but am not sure where/how to use it.