default_controller question. |
[eluser]LuckyFella73[/eluser]
You can set up a is_the_user_logged_in class and call it in every controllers constructor or better (in case you have to check the login state in every controller) extend the main controller and do the check there. By extending the main controller you can define actions that are called/executed everytime you access any of your controllers. You can find a tutorial by Phil Sturgeon how to do that here: http://philsturgeon.co.uk/news/2010/02/C...ing-it-DRY There is a tutorial for the CI2 version available too at the same website. |
Messages In This Thread |
default_controller question. - by El Forum - 11-18-2010, 03:18 AM
default_controller question. - by El Forum - 11-18-2010, 03:23 AM
default_controller question. - by El Forum - 11-18-2010, 03:24 AM
default_controller question. - by El Forum - 11-18-2010, 03:25 AM
default_controller question. - by El Forum - 11-18-2010, 03:29 AM
default_controller question. - by El Forum - 11-18-2010, 03:32 AM
default_controller question. - by El Forum - 11-18-2010, 03:35 AM
default_controller question. - by El Forum - 11-18-2010, 03:36 AM
default_controller question. - by El Forum - 11-18-2010, 03:42 AM
default_controller question. - by El Forum - 11-18-2010, 03:48 AM
|