|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com) 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 * Backend user switchback 00026 * 00027 * $Id: class.tx_beuser_switchbackuser.php 10120 2011-01-18 20:03:36Z ohader $ 00028 * 00029 * @author Sebastian Kurfürst <sebastian@garbage-group.de> 00030 */ 00031 class tx_beuser_switchbackuser { 00032 function switchBack($params, $that) { 00033 if($that->session_table == 'be_sessions' && $that->user['uid'] && $that->user['ses_backuserid']) { 00034 $updateData = array( 00035 'ses_userid' => $that->user['ses_backuserid'], 00036 'ses_backuserid' => 0 00037 ); 00038 $GLOBALS['TYPO3_DB']->exec_UPDATEquery('be_sessions', 'ses_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['BE_USER']->id, 'be_sessions').' AND ses_name=\'be_typo_user\' AND ses_userid='.intval($GLOBALS['BE_USER']->user['uid']),$updateData); 00039 00040 $redirectUrl = $GLOBALS['BACK_PATH'] . 'index.php' . ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] ? '' : '?commandLI=1'); 00041 t3lib_utility_Http::redirect($redirectUrl); 00042 } 00043 } 00044 } 00045 00046 ?>
1.8.0