Code Search for Developers
 
 
  

LogoutController.php from Astrum Futura at Krugle


Show LogoutController.php syntax highlighted

<?php
/**
 * Astrum Futura: Open Source Space Strategy Game
 *
 * LICENSE
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@astrumfutura.com so we can send you a copy immediately.
 *
 * @category    Astrum
 * @package     Astrum_Controller
 * @copyright   Copyright (c) 2006 Pádraic Brady (http://blog.quantum-star.com)
 * @license     http://www.gnu.org/copyleft/gpl.html     GNU General Public License
 * @version     $Id$
 */

/**
 * Logout Controller
 *
 * @category   Astrum
 * @package    Astrum_Controller
 * @copyright  Copyright (c) 2006 Pádraic Brady (http://blog.quantum-star.com)
 * @license    http://www.gnu.org/copyleft/gpl.html     GNU General Public License
 */
class LogoutController extends Astrum_Controller_Action
{

    /**
     * Forward invalid routes to the IndexController
     *
     * @access public
     */
    public function norouteAction()
    {
        $this->_forward('index', 'index');
    }

    /**
     * Logout by destroying both the session data and
     * session cookie.
     * Small quirk here, need to unset the session authenticated
     * value for the page menu to update correctly.
     *
     * @access public
     * @todo Utilise feyd's SHA256 class for hashing passwords
     * @todo Implement challenge/response system
     */
    public function indexAction()
    {
        $this->_session->authenticated = null;
        Zend_Session_Core::destroy(true);
        $this->_forward('index', 'index');
    }

}



See more files for this project here

Astrum Futura

Multiplayer space strategy game written in PHP5 with the Zend Framework. User interface uses Javascript/AJAX for dynamic interaction. Players compete across a hexagonal map of 10,000 sectors, planets, stars and other locations through trade and combat.

Project homepage: http://sourceforge.net/projects/astrumfutura
Programming language(s): PHP,XML
License: other

  AboutController.php
  GameController.php
  IndexController.php
  LoginController.php
  LogoutController.php
  NewsController.php
  SignupController.php
  TestController.php