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/Controller/Logout.php
2013-10-09 10:24:11 +11:00

29 lines
646 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides logout capability
*
* @package lnApp
* @category 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()) {
$ao = Auth::instance()->get_user();
if (method_exists($ao,'log'))
$ao->log('Logged Out');
Auth::instance()->logout(TRUE);
}
HTTP::redirect('welcome/index');
}
}
?>