TYPO3 API  SVNRelease
class.tx_openid_return.php
Go to the documentation of this file.
00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 2008-2011 Dmitry Dulepov <dmitry@typo3.org>
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *
00017 *  This script is distributed in the hope that it will be useful,
00018 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 *  GNU General Public License for more details.
00021 *
00022 *  This copyright notice MUST APPEAR in all copies of the script!
00023 ***************************************************************/
00024 /**
00025  * [CLASS/FUNCTION INDEX of SCRIPT]
00026  *
00027  *
00028  *
00029  *   59: class tx_openid_return
00030  *   65:     public function main()
00031  *
00032  * TOTAL FUNCTIONS: 1
00033  * (This index is automatically created/updated by the extension "extdeveval")
00034  *
00035  */
00036 
00037 // Fix _GET/_POST values for authentication
00038 if (isset($_GET['login_status'])) {
00039     $_POST['login_status'] = $_GET['login_status'];
00040 }
00041 
00042 define('TYPO3_MOD_PATH', 'sysext/openid/');
00043 require_once('../../init.php');
00044 
00045 /**
00046  * This class is the OpenID return script for the TYPO3 Backend.
00047  *
00048  * $Id: class.tx_openid_return.php 10120 2011-01-18 20:03:36Z ohader $
00049  *
00050  * @author  Dmitry Dulepov <dmitry@typo3.org>
00051  */
00052 class tx_openid_return {
00053     /**
00054     * Processed Backend session creation and redirect to backend.php
00055     *
00056     * @return   void
00057     */
00058     public function main() {
00059         if ($GLOBALS['BE_USER']->user['uid']) {
00060             t3lib_div::cleanOutputBuffers();
00061             $backendURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'backend.php';
00062             t3lib_utility_Http::redirect($backendURL);
00063         }
00064     }
00065 }
00066 
00067 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/openid/class.tx_openid_return.php'])) {
00068     include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/openid/class.tx_openid_return.php']);
00069 }
00070 
00071 $module = t3lib_div::makeInstance('tx_openid_return');
00072 /* @var tx_openid_return $module */
00073 $module->main();
00074 
00075 ?>