This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
lnapp/classes/lnApp/Auth.php

23 lines
606 B
PHP

<?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;
}
}