Welcome Guest, Not a member yet? Register   Sign In
function is_logged

[eluser]Felipe Deitos[/eluser]

I got a newbie question...
I have a function that check if user is logged...

I must put this function in every controller?
What it the best practice to do something like this without repeating the same function in every controller.

Thanks for the attention!

I usually use it like this in every controller that needs authentication.
public function admin()
             // admin contents


[eluser]Felipe Deitos[/eluser]
Well i am doing like this, putting the is_logged and is_admin in every page..
I just want to know if this is the better way, and if there is other ways to do that

Thanks for the answer!

Theme © iAndrew 2016 - Forum software by © MyBB