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

Admin Panel User Management Demo - CodeIgniter + AdminLTE Theme
http://cias.codeinsect.com
GNU General Public License v3.0
338 stars 241 forks source link

Checking user is Admin or Manager is not working #69

Closed myselfsufiyan closed 4 years ago

myselfsufiyan commented 4 years ago

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

myselfsufiyan commented 4 years ago

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(); }