[TYPO3-dev] Create and login temp user

Sebastian Gebhard s.gebhard at markenmotiv.de
Thu Mar 12 12:11:24 CET 2009


Martin Kutschker schrieb:
 > You don't need a login to store data in the session.
 >
 > Masi

Yes I know that. But in my case I need a FE user. Storing session data 
is not the problem.

e.g. I define a new User:

$time = time();
$user = array(
     'pid' => $this->conf['userPid'],
     'tstamp' => $time,
     'crdate' => $time,
     'username' => $this->generateTmpUsername(),
     'password' => $this->generateTmpUserpwd(),
     'usergroup' => $this->conf['tmpUsergroupId']
);
$GLOBALS['TYPO3_DB']->exec_INSERTquery('fe_users',$user);

// Something like
// $GLOBALS['TSFE']->fe_user->auth($user['username'], $user['password']);

Somewhere there has to be a simple method for that!?




More information about the TYPO3-dev mailing list