<?php

class MY_Controller extends CI_Controller{

  protected function check_admin() {
    if(! $this->ion_auth->logged_in()){
      redirect('auth/login', 'refresh');
      return (false);
    }elseif(! $this->ion_auth->is_admin()){
      return show_error('You must be an administrator to view this page.');
    }else{
      return (true);
    }
  }
  
}

Create Custom Controller Class (c4) with check_admin() method
Create Custom Controller Class (c4) with check_admin() method

Signed-off-by: JWhy <6a9f7c06e789f829524fd1a3a38b8c7d794c3a1f@jwhy.de>
