Esempio n. 1
0
 public function __construct()
 {
     // Load required Libs
     parent::__construct();
     // Init a session var
     $this->user = $this->load->library('User')->data;
     // Make sure the user has admin access'
     if (!($this->user['is_admin'] == 1 || $this->user['is_super_admin'] == 1)) {
         // Throwing an exception will cause the class init to fail ;)
         throw new Exception('Must be an admin');
         return FALSE;
     }
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
 }