Welcome Guest, Not a member yet? Register   Sign In
Best approach for session verification
#1

[eluser]Unknown[/eluser]
Hello guys

I am currently working in one project with require authentication from the user. Once the User logs in, I put some data in the session for use later in other controllers.

In the others controllers, I always check if the session is valid in order to redirect the User to the correct place. However the project will probably grow to the point of being inefficient check the session manually in each controller.

Today i saw this post: Creating user session checking with CodeIgniter library, but I'm not convicted that is the best approach for do this.

Probably you have more efficient solutions, perhaps involving hooks or even something simpler

Thanks!
Raony
#2

[eluser]InsiteFX[/eluser]
CodeIgniter Base Classes: Keeping it DRY
#3

[eluser]Unknown[/eluser]
Thank you!

This really looks the best way to deal with these types of permissions. Just solve the problem of a simple and elegant way.




Theme © iAndrew 2016 - Forum software by © MyBB