Question

today i download a 3.3.0 but have error when working with Auth and ORM :

Fatal error: Class 'Auth_Orm' not found in /home/vsao4/domains/v4.mclub.vn/public_html/modules/auth/classes/Kohana/Auth.php on line 37

My Auth config as below :

'driver'       => 'orm',
'hash_method'  => 'md5',
'hash_key'     => 'secret',
'lifetime'     => 1209600,
'session_type' => Session::$default,
'session_key'  => 'auth_user',

and the code is :

 $ars = array(
                'username'=>'manhquan',
                'password'=>'232323',
                'email'=>'manhquan@fifthmediacorp.com'
            );
            if (Auth::instance()->login($ars['username'], $ars['password']))
            {

                    // sucessfully loged
                    $this->response->body('login');

            } else {
                //TODO error
                $this->response->body('not login');
            }
Was it helpful?

Solution

change

'driver' => 'orm',

to

'driver' => 'ORM',

Also, there will be an error to Database_Mysql class. Also change your config/database.php file:

'type' => 'mysql',

to

'type' => 'MySQL',

This happens due to new Kohana conventions: http://kohanaframework.org/3.3/guide/kohana/conventions

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top