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/lnapp/logout.php
2011-05-03 09:49:04 +10:00

27 lines
624 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides logout capability
*
* @package lnApp
* @subpackage Page/Logout
* @category Controllers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
* @also [login]
*/
class Controller_lnApp_Logout extends Controller {
public function action_index() {
# If user already signed-in
if (Auth::instance()->logged_in()!= 0) {
Auth::instance()->logout();
Request::instance()->redirect('login');
}
Request::instance()->redirect('welcome/index');
}
}
?>