Cleanup: Updated copyright notices
[Packages/TYPO3.CMS.git] / typo3 / sysext / openid / class.tx_openid_return.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2008-2009 Dmitry Dulepov <dmitry@typo3.org>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24 /**
25 * [CLASS/FUNCTION INDEX of SCRIPT]
26 *
27 *
28 *
29 * 59: class tx_openid_return
30 * 65: public function main()
31 *
32 * TOTAL FUNCTIONS: 1
33 * (This index is automatically created/updated by the extension "extdeveval")
34 *
35 */
36
37 // Fix _GET/_POST values for authentication
38 if (isset($_GET['login_status'])) {
39 $_POST['login_status'] = $_GET['login_status'];
40 }
41
42 define('TYPO3_MOD_PATH', 'sysext/openid/');
43 require_once('../../init.php');
44
45 /**
46 * This class is the OpenID return script for the TYPO3 Backend.
47 *
48 * $Id$
49 *
50 * @author Dmitry Dulepov <dmitry@typo3.org>
51 */
52 class tx_openid_return {
53 /**
54 * Processed Backend session creation and redirect to backend.php
55 *
56 * @return void
57 */
58 public function main() {
59 if ($GLOBALS['BE_USER']->user['uid']) {
60 while (ob_get_level()>0) {
61 @ob_end_clean();
62 }
63 $backendURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'backend.php';
64 t3lib_div::redirect($backendURL);
65 }
66 }
67 }
68
69 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/openid/class.tx_openid_return.php']) {
70 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/openid/class.tx_openid_return.php']);
71 }
72
73 $module = t3lib_div::makeInstance('tx_openid_return');
74 /* @var tx_openid_return $module */
75 $module->main();
76
77 ?>