[BUGFIX] Make openid login working again
[Packages/TYPO3.CMS.git] / typo3 / sysext / openid / class.tx_openid_return.php
1 <?php
2 /*
3 * This file is part of the TYPO3 CMS project.
4 *
5 * It is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License, either version 2
7 * of the License, or any later version.
8 *
9 * For the full copyright and license information, please read the
10 * LICENSE.txt file that was distributed with this source code.
11 *
12 * The TYPO3 project - inspiring people to share!
13 */
14
15 // Fix _GET/_POST values for authentication (login_status has to be submitted via POST for BE auth)
16 if (isset($_GET['login_status'])) {
17 $_POST['login_status'] = $_GET['login_status'];
18 }
19
20 define('TYPO3_MOD_PATH', 'sysext/openid/');
21 require_once '../../init.php';
22
23 /** @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication $beUser */
24 $beUser = $GLOBALS['BE_USER'];
25 if ($beUser->user['uid']) {
26 \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers();
27 $backendURL = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'backend.php';
28 \TYPO3\CMS\Core\Utility\HttpUtility::redirect($backendURL);
29 }