flexi auth - A user authentication library for CodeIgniter |
[eluser]katanama[/eluser]
[quote author="jasonlally" date="1355896985"]I am currently getting this error on the demo when purposefully submitting a registration with errors. I'm trying to test the messages: Fatal error: Cannot access protected property Auth::$data in /[my directory]/application/models/demo_auth_model.php on line 10 Registration happens perfectly when I don't try to trip it up. Line 10 is the return of the following function in the Demo_auth_model class: Code: public function &__get($key) Any idea what could be causing this? Oddly the comment says this function is explicitly to avoid this error: // The following method prevents an error occurring when $this->data is modified. But I'm still getting it. I'm on CodeIgniter 2.1.3[/quote] I'm also new to Flexi Auth and beginner in PHP, but let me try to help you. 1. Are you using HMVC extension? Which one? 2. How do you declare your $data in your controller? - As a class member properties, or? - as a method variable, or? - in the constructor as a new stdClass like in the demo? &__get($name) is a PHP magic method that handle overloading. Quote:http://php.net/manual/en/language.oop5.o...object.get |
Welcome Guest, Not a member yet? Register Sign In |