• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help: Where to put my controller function logged_in()

#2
[eluser]WanWizard[/eluser]
Read up on base controllers.

Phil Sturgeon wrote a good article about it.

In short, create an Public_Controller, Private_Controller and maybe an Admin_Controller. All extend CI_Controller. All your controllers that need to be accessable without authentication will extend Public_Controller, all controllers that require you to be logged in extend Private_Controller, which checks the logged in state. And you may have other base controller for specific functions.

You also use these base controllers to house all methods and properties that should be available to all your controllers, so you'll have to code them only once.


Messages In This Thread
Help: Where to put my controller function logged_in() - by El Forum - 03-19-2011, 04:31 AM
Help: Where to put my controller function logged_in() - by El Forum - 03-19-2011, 04:49 AM
Help: Where to put my controller function logged_in() - by El Forum - 03-19-2011, 05:08 AM
Help: Where to put my controller function logged_in() - by El Forum - 03-19-2011, 05:27 AM
Help: Where to put my controller function logged_in() - by El Forum - 03-19-2011, 05:48 AM
Help: Where to put my controller function logged_in() - by El Forum - 03-19-2011, 08:19 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.