<?php
/**
 * @copyright ONE/DEPO Project
 * @license   PHP License 3.01 <http://www.php.net/license/3_01.txt>
 */


/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
require_once 'Net/UserAgent/Mobile.php';

/**
 * ログアウト
 *
 * @package     User.Logout
 * @author      netnee T.Otogawa <tomokazu.otogawa@netnee.jp>
 * @access      public
 */
class User_Logout
{
    var $title;
    var $pagename;

    var $auth;

    function execute()
    {
        $mobile = &Net_UserAgent_Mobile::isMobile();
        $re_str = ($mobile) ? "mobile_" : "";

        $log =& LogFactory::getLog();
        $log->debug("User_Logoutが実行されました", "User_Logout#execute");

        if ($this->auth->checkAuth()) {
            $this->auth->logout();
        } else {
            return 'autherr';
        }
        return $re_str .'success';
    }
}
?>
