CodeIgniter Forums
Accessing autoloaded library from model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Accessing autoloaded library from model (/showthread.php?tid=30677)



Accessing autoloaded library from model - El Forum - 05-22-2010

[eluser]mikegioia[/eluser]
Hi guys -

I know this is possible as I use the session/database libraries from models but for some reason I'm getting this error in one of my models:

Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Course_model::$gmauth
Filename: models/course_model.php
Line Number: 123

I'm loading the library 'gmauth' in the autoloader which loads the model course_model. The library is being loaded correctly but for some reason when I try to call
Code:
$this->gmauth->dosomething()
from the course_model it barfs and throws this error.

I'd appreciate any help. Thanks!
Mike