Welcome Guest, Not a member yet? Register   Sign In
Cannot Load Session/Model in Hook
#2

[eluser]jitterbug[/eluser]
Another case of know what youre using before you use it!

$this->load->session is the correct way to grab the session. Reloading the library will cause conflicts in your code...

As an aside it took me 3 hours to figure this out (and only because I used print_r($this) to sort through the tree until session. It would be nice if the autoload page told new users how to load in classes that have been autoloaded. Perhaps its there somewhere, but I really poured over the wiki, user guide, and forums to find an answer to this.

Moreover it appears many users are incorrectly using $this->load->library['session'] to load the session into their controller object when in reality they just want $this->load->session. While this is obvious in retrospect I dont think it is obvious to new users who do not understand things.

Thanks and yay!


Messages In This Thread
Cannot Load Session/Model in Hook - by El Forum - 01-08-2010, 06:04 PM
Cannot Load Session/Model in Hook - by El Forum - 01-08-2010, 08:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB