[TYPO3-german] automatisches login eines FE users
    Andreas Otto 
    andreas.otto at dkd.de
       
    Thu May 10 18:34:39 CEST 2007
    
    
  
Hallo Sebastian,
sebastian stephan wrote:
> soweit ist auch alles
> fertig und dieser standartnutzer existiert auch schon. nur hab ich
> überhaupt keine ahnung wie ich diesen einloggen kann.
> bin für jede idee dankbar.
Vielleicht helfen Dir dieses Beispiel:
// Login user
$loginData=array(
        'uname' => $userdata['username'],
        'uident'=> $userdata['password'],
        'status' =>'login'
);
$GLOBALS['TSFE']->fe_user->checkPid = FALSE;
$info = $GLOBALS['TSFE']->fe_user->getAuthInfoArray();
$user = $GLOBALS['TSFE']->fe_user->fetchUserRecord( $info['db_user'],
$loginData['uname'] );
$ok=$GLOBALS['TSFE']->fe_user->compareUident( $user, $loginData );
if( $ok ) {
        $GLOBALS['TSFE']->fe_user->createUserSession( $user );
        $GLOBALS['TSFE']->loginUser = 1;
        $GLOBALS['TSFE']->fe_user->start();
}
Liebe Grüße,
Andreas
    
    
More information about the TYPO3-german
mailing list