37 lines
806 B
PHP
37 lines
806 B
PHP
<?php
|
|
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
|
|
/**
|
|
* 登出动作
|
|
*
|
|
* @category typecho
|
|
* @package Widget
|
|
* @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org)
|
|
* @license GNU General Public License 2.0
|
|
* @version $Id$
|
|
*/
|
|
|
|
/**
|
|
* 登出组件
|
|
*
|
|
* @category typecho
|
|
* @package Widget
|
|
* @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org)
|
|
* @license GNU General Public License 2.0
|
|
*/
|
|
class Widget_Logout extends Widget_Abstract_Users implements Widget_Interface_Do
|
|
{
|
|
/**
|
|
* 初始化函数
|
|
*
|
|
* @access public
|
|
* @return void
|
|
*/
|
|
public function action()
|
|
{
|
|
$this->user->logout();
|
|
$this->pluginHandle()->logout();
|
|
$this->response->goBack(NULL, $this->options->index);
|
|
@session_destroy();
|
|
}
|
|
}
|