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.
phptsmadmin/application/classes/lnApp/Controller/Logout.php

27 lines
594 B
PHP
Raw Normal View History

2011-01-17 05:33:55 +00:00
<?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]
*/
2012-11-26 05:57:18 +00:00
class lnApp_Controller_Logout extends Controller {
2011-01-17 05:33:55 +00:00
public function action_index() {
# If user already signed-in
if (Auth::instance()->logged_in()!= 0) {
Auth::instance()->logout();
2012-11-26 05:57:18 +00:00
HTTP::redirect('login');
2011-01-17 05:33:55 +00:00
}
2012-11-26 05:57:18 +00:00
HTTP::redirect('welcome/index');
2011-01-17 05:33:55 +00:00
}
}
?>