Welcome Guest, Not a member yet? Register   Sign In
Am I loading a class twice?
#5

[eluser]umefarooq[/eluser]
[quote author="nuwanda" date="1286453542"]Further, all I do in the constructor of every controller for admin pages is:

Code:
if(!$this->user->is_admin()){
  redirect to non-admin
}
[/quote]

no need to put even this code in every controller constructor you can put in your MY_Controller or create one Admin_Controller and extend your all admin controller with this and put this code in your parent class constructor and it will be called first every time


Messages In This Thread
Am I loading a class twice? - by El Forum - 10-07-2010, 12:26 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 12:38 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 01:02 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 01:12 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 01:18 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 01:37 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 01:47 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:00 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:15 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:28 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:31 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:36 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:42 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:47 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:48 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:54 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 02:57 AM
Am I loading a class twice? - by El Forum - 10-07-2010, 03:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB