<?php defined('SYSPATH') or die('No direct access allowed.'); /** * This class overrides Kohana's Auth * * This file contains enhancements for Kohana, that should be considered upstream and maybe havent been yet. * * @package lnApp * @category Modifications * @author Deon George * @copyright (c) 2014 Deon George * @license http://dev.leenooks.net/license.html */ abstract class lnApp_Auth extends Kohana_Auth { protected $_model = 'Account'; public function get_user($default=NULL) { $x = parent::get_user($default); return (! $x) ? ORM::factory($this->_model) : $x; } }