Welcome Guest, Not a member yet? Register   Sign In
Call diferent model
#1

[eluser]Unknown[/eluser]
I have a Controller called Admin who give access to the website administrative panel and a model called Login who has the functions to verify if the user is logged in.

Its a good pratice to do a $this->load->model('login_model') at my admin controller or I have to create an login controller?
#2

[eluser]pickupman[/eluser]
I would say it is common practice to need both. You will need a auth model to query to DB for user credentials. Typically you will find it the easiest to have some sort of auth controller, to allow users to login/logout/update profile. By having one point of entry to login it will be easier to maintain. You may end up extending your application that may require login as well.




Theme © iAndrew 2016 - Forum software by © MyBB