I am trying to use the Auth module with ORM driver in Kohana 3.3.0, but the only thing I can do is insert new users in the database. I can't login with them.
$user = ORM::factory('User')->create_user($user_data, array(
'username',
'password')
);
$user->save();
$user_id = !empty($user->id) ? $user->id : 0;
$user_type = !empty($_POST['admintype'] ? $_POST['admintype'] : 3);
//$user->add('roles', ORM::factory('Role', array('name' => 'login')));
$user->add('roles', $user_type);
user is created but when i try to login it returns null
$user_name = !empty($_POST['username']) ? $_POST['username'] : '';
$userpassword = !empty($_POST['userpassword']) ? ($_POST['userpassword']) : '';
$user = Auth::instance()->login($user_name, $userpassword);
$user_nameand$userpasswordbefore this$user = Auth::instance()->login($user_name, $userpassword);is executed? Perhaps these data points are null or invalid?? - RyanNerd