[eluser]albertleao[/eluser]
Hello!
I currently use a variable in MY_Controller.php and MY_Model.php to store my user object that I retrieve via phpactiverecord.
This means that I'm performing 2 queries to my DB every request. I'd like to only query once and have the object available to both my controllers and models. Any suggestions on how to do this?
I currently have the following code in my model and controller extensions:
Code:
$this->currentuser = User::find(1);