kishor10d/Admin-Panel-User-Management-using-CodeIgniter

Checking user is Admin or Manager is not working

Closed this issue · 1 comments

Hi Kishor,
Thanks for this great startup CodeIgniter project, this saved me a lot of time.
Furthermore, today, when I was trying to validate an action which is only allowed by admin and manager, is not working, could you please help me, my code:
//echo $this->global ['role'];exit(); //printing 1 or 2 properly...
if($this->isTicketter() == TRUE)
{
$this->loadThis();
}else{
echo "I am Admin or may be Manager....";
}
Thanks in advance

Currently, I'm using the below code to continue my work:

$roleID = $this->global ['role'];
if($roleID == ROLE_ADMIN || $roleID == ROLE_MANAGER)
{
echo "DONE....";
}
else
{
$this->loadThis();
}