Welcome Guest, Not a member yet? Register   Sign In
Check at the start of controller...???
#1

[eluser]Gewa[/eluser]
Hi, during programming in CI, i make user role check in each function for one controller. And there is a lot of things that I want to have in my hand beforehand in each controller before the function index()..


So what is the best way, for example to make


Code:
if($variable!="value"){
header("Location: /customer/login");
}


this code before the functions part,


instead of putting this code in all functions.....


Messages In This Thread
Check at the start of controller...??? - by El Forum - 05-01-2008, 12:20 PM
Check at the start of controller...??? - by El Forum - 05-01-2008, 12:25 PM
Check at the start of controller...??? - by El Forum - 05-01-2008, 01:07 PM
Check at the start of controller...??? - by El Forum - 05-01-2008, 01:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB