in "Tank_Auth.php" add the following function somewhere
Code:
/**
* Check roles
* This function provides an ability to check for a particular role
*
* Keep in mind that during the login process all the users roles were
* grabbed from the DB and stored in a variable for easy access
*
* Any 'role changes' would therefore require a user to logout of the site and
* log back in to take effect OR update the session yourself
*
* the model uses '%' as a string seperator
*
* @param string
* @return bool
*/
function check_roles($role)
{
$current_roles = $this->ci->session->userdata('roles');
$current_roles = explode("%", $current_roles);
reset ($current_roles);
foreach ($current_roles as $roles)
{
if (strcmp($role,$roles) == 0)
return TRUE;
}
return FALSE;
}