Hey Lasse, you need to use authentication services. That will allow you to use SSO and log the user in based on get parameters.
I have a module that can do that based on TS type of configuration. Please contact me private and I will explain how it works. Ries On Oct 1, 2007, at 6:58 AM, Lasse Guldsborg wrote: > Hi list! > > I'm making and extension to auto-login FE users by URL. > If the URL contains certain parameters a new FE user is created and > logged > in. > > Below is the part of the code, where the user i created and logged > in. It > works, but it's not too smooth. The whole page is loaded before it > reloads > and logs in the new user. > > Is there a better way? A way in which the user is logged in > immediately upon > creation.. before the HTML content starts generating. > > Any help and/or comments are appreciated! :o) > > Best regards, > Lasse > > ------------------------------------------ > > # Create user > $query = 'insert into fe_users (pid, tstamp, username, password, > usergroup, > endtime, name, crdate) > values ( > "314", > "'.$time.'", > "'.mysql_escape_string($username).'", > "'.mysql_escape_string($password).'", > "10", > "'.($endtime).'", > "'.mysql_escape_string($_GET['userid']).'", > "'.$time.'")'; > $GLOBALS["TYPO3_DB"]->sql_query($query) or die($query."\n > \n".mysql_error()); > > # login the new user > $content .= ' > <form method="post" id="fe_cfu_user_login_form" > action="'.$this->pi_getPageLink($GLOBALS["TSFE"]->id).'"> > <input type="hidden" id="user" name="user" value="'.$username.'" /> > <input type="hidden" id="pass" name="pass" value="'.$password.'" /> > <input type="hidden" name="logintype" value="login" /> > <input type="hidden" name="pid" value="314" /> > </form> > <script type="text/javascript"> > document.getElementById("fe_cfu_user_login_form").submit(); > </script>'; > > return $content; > > > _______________________________________________ > TYPO3-english mailing list > TYPO3-english@lists.netfielders.de > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english -- Ries van Twisk Freelance TYPO3 Developer email: [EMAIL PROTECTED] web: http://www.rvantwisk.nl/ skype: callto://r.vantwisk Phone: + 1 810-476-4193 _______________________________________________ TYPO3-english mailing list TYPO3-english@lists.netfielders.de http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english