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.
khosb/application/classes/controller/templatedefault/user.php

31 lines
1018 B
PHP
Raw Normal View History

2011-08-26 01:16:48 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* lnApp User Main home page controller
2011-08-26 01:16:48 +00:00
*
* @package lnApp
2011-08-26 01:16:48 +00:00
* @subpackage Page/User
* @category Controllers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Controller_TemplateDefault_User extends Controller_TemplateDefault {
protected $auth_required = TRUE;
// Our acccount object
protected $ao;
public function before() {
if (! count($this->secure_actions) OR (! isset($this->secure_actions[Request::current()->action()])))
throw new Kohana_Exception('Class has no security defined :class, or no security configured for :method',array(':class'=>get_class($this),':method'=>Request::current()->action()));
parent::before();
$this->ao = ORM::factory('account',Auth::instance()->get_user()->id);
if (! $this->ao->loaded())
throw new Kohana_Exception('Account doesnt exist :account ?',array(':account'=>Auth::instance()->get_user()->id));
}
}
?>