<?php
  include_once '../doc-typo3-funcs.php';
  $doxygen_vars = array(	"title" => "TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/beuser/class.tx_beuser_switchbackuser.php Source File",
				"datetime" => "Sat Dec 2 19:22:27 2006",
				"date" => "2 Dec 2006",
				"doxygenversion" => "1.4.6",
				"projectname" => "TYPO3 4.0.1",
				"projectnumber" => "4.0.1"
			);
  get_header($doxygen_vars);
?>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_c8daf1ad746050abf985cc546c89e248.html">typo3_src-4.0.1</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_18071ae4545d8b3e0364d30c0659c74a.html">typo3</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_57bf1ed8249c1fd5b014486d01bcb27a.html">sysext</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_bb4ca514b58a99bbe0aa8bf10be1acaa.html">beuser</a></div>
<h1>class.tx_beuser_switchbackuser.php</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?php
<a name="l00002"></a>00002 <span class="comment">/***************************************************************</span>
<a name="l00003"></a>00003 <span class="comment">*  Copyright notice</span>
<a name="l00004"></a>00004 <span class="comment">*</span>
<a name="l00005"></a>00005 <span class="comment">*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)</span>
<a name="l00006"></a>00006 <span class="comment">*  All rights reserved</span>
<a name="l00007"></a>00007 <span class="comment">*</span>
<a name="l00008"></a>00008 <span class="comment">*  This script is part of the TYPO3 project. The TYPO3 project is</span>
<a name="l00009"></a>00009 <span class="comment">*  free software; you can redistribute it and/or modify</span>
<a name="l00010"></a>00010 <span class="comment">*  it under the terms of the GNU General Public License as published by</span>
<a name="l00011"></a>00011 <span class="comment">*  the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00012"></a>00012 <span class="comment">*  (at your option) any later version.</span>
<a name="l00013"></a>00013 <span class="comment">*</span>
<a name="l00014"></a>00014 <span class="comment">*  The GNU General Public License can be found at</span>
<a name="l00015"></a>00015 <span class="comment">*  http://www.gnu.org/copyleft/gpl.html.</span>
<a name="l00016"></a>00016 <span class="comment">*</span>
<a name="l00017"></a>00017 <span class="comment">*  This script is distributed in the hope that it will be useful,</span>
<a name="l00018"></a>00018 <span class="comment">*  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00019"></a>00019 <span class="comment">*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00020"></a>00020 <span class="comment">*  GNU General Public License for more details.</span>
<a name="l00021"></a>00021 <span class="comment">*</span>
<a name="l00022"></a>00022 <span class="comment">*  This copyright notice MUST APPEAR in all copies of the script!</span>
<a name="l00023"></a>00023 <span class="comment">***************************************************************/</span>
<a name="l00029"></a><a class="code" href="classtx__beuser__switchbackuser.html">00029</a> <span class="keyword">class </span><a class="code" href="classtx__beuser__switchbackuser.html">tx_beuser_switchbackuser</a> {
<a name="l00030"></a><a class="code" href="classtx__beuser__switchbackuser.html#02585b27bc8f9223a3a44a4e257dfe54">00030</a>         function <a class="code" href="classtx__beuser__switchbackuser.html#02585b27bc8f9223a3a44a4e257dfe54">switchBack</a>($params, $that)     {
<a name="l00031"></a>00031                 <span class="keywordflow">if</span>($that-&gt;session_table == 'be_sessions' &amp;&amp; $that-&gt;user['uid'] &amp;&amp; $that-&gt;user['ses_backuserid']) {
<a name="l00032"></a>00032                         $updateData = array(
<a name="l00033"></a>00033                                 'ses_userid' =&gt; $that-&gt;user['ses_backuserid'],
<a name="l00034"></a>00034                                 'ses_backuserid' =&gt; 0
<a name="l00035"></a>00035                                 );
<a name="l00036"></a>00036                         $GLOBALS['TYPO3_DB']-&gt;exec_UPDATEquery('be_sessions', 'ses_id='.$GLOBALS['TYPO3_DB']-&gt;fullQuoteStr($GLOBALS['BE_USER']-&gt;<span class="keywordtype">id</span>, 'be_sessions').' AND ses_name=\'be_typo_user\' AND ses_userid='.intval($GLOBALS['BE_USER']-&gt;user['uid']),$updateData);
<a name="l00037"></a>00037 
<a name="l00038"></a>00038                         header('Location: '.<a class="code" href="classt3lib__div.html#6c7d1f6a781970006fc7110913fc8848">t3lib_div::locationHeaderUrl</a>($GLOBALS['BACK_PATH'].'index.php'.($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']?'<span class="charliteral">':'</span>?commandLI=1')));
<a name="l00039"></a>00039                         exit;
<a name="l00040"></a>00040                         <span class="comment">//$GLOBALS['TYPO4</span>
<a name="l00041"></a>00041                 }
<a name="l00042"></a>00042         }
<a name="l00043"></a>00043 }
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 ?&gt;
</pre></div><?php
  include_once '../doc-typo3-funcs.php';
  get_footer();
?>