Welcome Guest, Not a member yet? Register   Sign In
How models and the such exactly work in CI
#1

[eluser]Bobtorious[/eluser]
Hi,
First, forgive me for the noobishness of this question as I come from a desktop application development world, so the transition to the web development world has been a bit chaotic as you can imagine Smile

Does CI keep models loaded between different functions and controllers? For instance, lets say I have a user model that I instantiate when someone logs into my application. Will that user object (with it's pertinent information) be available across my various functions and controllers, or will I have to load my user model and repopulate it with the information? What I'm doing right now is, when I user logs in, I store their ID in a session, and then every time I need user information, such as name or permissions, I load the user model, grab the user id from the session, and then use my various methods I've written in my model to get the information.

I'm guess I'm asking if this is a CI best practice?

Thanks!

Bob


Messages In This Thread
How models and the such exactly work in CI - by El Forum - 07-20-2007, 10:00 AM
How models and the such exactly work in CI - by El Forum - 07-20-2007, 11:21 AM
How models and the such exactly work in CI - by El Forum - 07-20-2007, 11:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB