Initial Leenooks Module for Kohana

This commit is contained in:
Deon George
2013-04-22 15:50:28 +10:00
commit b310cdb125
55 changed files with 11514 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides logout capability
*
* @package lnApp
* @category lnApp/Controllers
* @author Deon George
* @copyright (c) 2009-2013 Deon George
* @license http://dev.leenooks.net/license.html
* @also [login]
*/
class lnApp_Controller_Logout extends Controller {
public function action_index() {
// If user already signed-in
if (Auth::instance()->logged_in() != 0) {
$ao = Auth::instance()->get_user();
if (method_exists($ao,'log'))
$ao->log('Logged Out');
Auth::instance()->logout();
HTTP::redirect('login');
}
HTTP::redirect('welcome/index');
}
}
?>