"TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/cms/tslib/class.tslib_eidtools.php Source File", "datetime" => "Sat Dec 2 19:22:28 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?>

class.tslib_eidtools.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 2006 Kasper Skaarhoj (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 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00074 class tslib_eidtools {
00075 
00081         function initFeUser()   {
00082                 global $TYPO3_CONF_VARS;
00083 
00084                         // Include classes necessary for initializing frontend user:
00085                         // We will use tslib_fe to do that:
00086                 require_once(PATH_tslib.'class.tslib_fe.php');
00087                 require_once(PATH_t3lib.'class.t3lib_cs.php');
00088                 require_once(PATH_t3lib.'class.t3lib_userauth.php');
00089                 require_once(PATH_tslib.'class.tslib_feuserauth.php');
00090 
00091                         // Make new instance of TSFE object for initializing user:
00092                 $temp_TSFEclassName = t3lib_div::makeInstanceClassName('tslib_fe');
00093                 $TSFE = new $temp_TSFEclassName($TYPO3_CONF_VARS,0,0);
00094                 $TSFE->connectToDB();
00095 
00096                         // Initialize FE user:
00097                 $TSFE->initFEuser();
00098 
00099                         // Return FE user object:
00100                 return $TSFE->fe_user;
00101         }
00102 
00108         function connectDB()    {
00109                 global $TYPO3_DB;
00110 
00111                 $TYPO3_DB->connectDB();
00112         }
00113 }
00114 ?>