I am using the ion auth library for the CodeIgniter HMVC, I have copied all files from ion auth library to main CodeIgniter files but the controller, model, and views files copy to module directory Now it's showing me this error.
A PHP Error was encountered
Message: Undefined property: Auth::$ion_auth_model
Line Number: 122
Line: 122 Function: _error_handler
Line: 70 Function: __get
Line: 173 Function: _ci_load_library
Line: 192 Function: library
Line: 153 Function: libraries
Line: 9 Function: library
File: /opt/lampp/htdocs/CI_Hmvc/index.php Line: 315 Function:
I believe the problem is that the library is not finding the model. Check inside ion auth library construct. Look for the line where it says
It should be line 122 since that's where the error is ocurring. In here you need to prefix the module name - where you have the
ion_auth_model - to the model path so the loader class knows where to find it.
In your case if the module's name is directory, then 'directory/ion_auth_model'.
Check this solution https://stackoverflow.com/a/7003180/5785088, point 10, last item. Hope it helps.