27 lines
635 B
PHP
27 lines
635 B
PHP
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||
|
|
||
|
/**
|
||
|
* This class provides logout capability
|
||
|
*
|
||
|
* @package PLA
|
||
|
* @subpackage Page/Logout
|
||
|
* @category Controllers
|
||
|
* @author Deon George
|
||
|
* @copyright (c) phpLDAPadmin Development Team
|
||
|
* @license http://dev.phpldapadmin.org/license.html
|
||
|
* @also [login]
|
||
|
*/
|
||
|
class PLA_Controller_Logout extends Controller {
|
||
|
public function action_index() {
|
||
|
# If user already signed-in
|
||
|
if (Auth::instance()->logged_in()!= 0) {
|
||
|
Auth::instance()->logout();
|
||
|
|
||
|
Request::current()->redirect('login');
|
||
|
}
|
||
|
|
||
|
Request::current()->redirect('welcome/index');
|
||
|
}
|
||
|
}
|
||
|
?>
|