Welcome Guest, Not a member yet? Register   Sign In
Login System - Code Igniter just makes things excessively complex..
#4

[eluser]Vheissu[/eluser]
I tend to create a class for admin users and a class for client users inside of my MY_Controller. So I have the following.

Code:
class MY_Controller extends Controller {

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

}

class Admin_Controller extends MY_Controller {

    function Admin_Controller() {
        parent::MY_Controller();
    }

}



class Client_Controller extends MY_Controller {

    function Client_Controller() {
        parent::MY_Controller();
    }

}

Then inside of your normal controllers extend whichever class you want to extend. So if you have a controller for admin stuff you would obviously extend the Admin_Controller, client stuff would extend the Client_Controller and other operations like some simple login pages and other controllers that don't require any verification.


Messages In This Thread
Login System - Code Igniter just makes things excessively complex.. - by El Forum - 08-14-2010, 08:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB