Welcome Guest, Not a member yet? Register   Sign In
How to know if a model is already loaded?
#1

[eluser]Unknown[/eluser]
Hi everyone!

I'm so sorry but I don't found anywhere what I'm looking for to solve my problem (..and sorry for my English.. I'm italian ) Tongue

...that's my problem:
in the constructor of the controller I load a model that I use in the head of the index function:
Code:
function index() {
if ( $this->login_model->_is_logged() ) {
  //show logged in page
}
else {
  //show login form
}
}
and it works perfectly... if I don't reload the page shown Big Grin

The "_is_logged()" function checks session and cookies, but these contain a encrypted part of the data passed via form.

When I refresh the "logged in" page, without resending data, it goes back, obviously, at the login form, because it reloads the model again and the saved datas are lost.


How can I know if a model is already loaded or not?


Thanks guys Smile


edit: oh.. I've seen this is not the correct section for my question Sad ..excuse me..


Messages In This Thread
How to know if a model is already loaded? - by El Forum - 02-10-2011, 10:00 AM
How to know if a model is already loaded? - by El Forum - 02-11-2011, 04:36 AM
How to know if a model is already loaded? - by El Forum - 02-11-2011, 05:25 AM
How to know if a model is already loaded? - by El Forum - 02-11-2011, 04:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB