Welcome Guest, Not a member yet? Register   Sign In
Best way to create user authentication
#2

[eluser]PhilTem[/eluser]
Best would be to create a library that is accessed from every controller since models are designed or intended to only talk to the database - even though there is a pretty loose interpretation of the MVC-pattern in CI.
The library than packs stuff together from necessary model(s) and helper(s) to create the actions required and to provide appropriate and needed information.

And don't forget you can create different types of "default controllers" by extending CI_Controller. Create a MY_Controller, that'll load you auth-library, create a Registered_Controller that checks in the constructor whether the session for a logged in user is set or not. Makes life so much easier Wink


Messages In This Thread
Best way to create user authentication - by El Forum - 01-27-2012, 03:58 AM
Best way to create user authentication - by El Forum - 01-27-2012, 05:03 AM
Best way to create user authentication - by El Forum - 01-27-2012, 05:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB