Welcome Guest, Not a member yet? Register   Sign In
Accessing functions from external controllers
#2

[eluser]Thorpe Obazee[/eluser]
You can extend the Controller via: MY_Controller

Code:
class MY_Controller extends Controller {

    function MY_Controller()
    {
        parent::Controller();



            if ( ! $this->auth->logged_in(array('login', 'admin')))
            {
                $this->session->set_flashdata('message', 'You do not have access to view this page');

                redirect('admin/test/users/login');
            }

    }
}

http://ellislab.com/codeigniter/user-gui...asses.html


Messages In This Thread
Accessing functions from external controllers - by El Forum - 11-08-2009, 07:04 PM
Accessing functions from external controllers - by El Forum - 11-08-2009, 07:25 PM
Accessing functions from external controllers - by El Forum - 11-08-2009, 08:07 PM
Accessing functions from external controllers - by El Forum - 11-08-2009, 08:30 PM
Accessing functions from external controllers - by El Forum - 11-08-2009, 08:48 PM
Accessing functions from external controllers - by El Forum - 11-09-2009, 12:33 AM
Accessing functions from external controllers - by El Forum - 11-09-2009, 02:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB