[TYPO3-english] Auto-login

Ries van Twisk typo3 at rvt.dds.nl
Wed Aug 26 01:37:10 CEST 2009


On Aug 25, 2009, at 5:32 PM, Duch wrote:

> Hi all,
>
> i'm trying to implement a simple autologin feature in one of my  
> plugins.
>
> It is a simple user registration plugin with a confirmation e-mail.
> I'd like the user to be automatically logged-in when he clicks on the
> approve link.
> Everything works fine (user is registered, approve link works, user
> can login with a standard login form) but i'm stuck with the autologin
> feature.
>
> - I've check sr_feuser_register autologin feature and it is not
> suitable for me since login and password appear as clear text in the
> url.
> - i've read cc_svauthdemo code and manual but couldn't find a way to
> make use of it (i'm not using a service, i'm in a plugin context)
> - i've tried to implement the processLoginData from
> class.t3lib_userauth.php but failed miserably (compareUident says
> everything's ok, but user is not logged-in anyway)
>
> Could anyone point me to the right direction (an extension already
> doing that?), i think i'm close to a solution with processLoginData
> but i must be missing a couple of important parameters to pass to the
> method.
>
>
> i've tried that :
>
> $loginData = array();
> $loginData['uname'] = $user['username']; // where user is my user  
> record
> $loginData['uident'] = $user['password']; // where user is my user
> record
> $loginData = $GLOBALS['TSFE']->fe_user->processLoginData($loginData,
> 'normal');
>
> print_r($this->compareUident($user, $loginData)) // says '1', i
> assume, this is ok
>

Duch,

I have news for you.... it's a service you really need.
without going into to much detail, you have to sub-class tx_sv_authbase

and create a init, getUser and a authUser method.

You need to register the service using : t3lib_extMgm::addService  
(......);

There quite a bit of example in TER that do this work...

Ries


>
>
> Thanks for your help,
> Duch
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english








			regards, Ries van Twisk

-------------------------------------------------------------------------------------------------
tags: Freelance TYPO3 Glassfish JasperReports JasperETL Flex Blaze-DS  
WebORB PostgreSQL DB-Architect
email: ries at vantwisk.nl        web:   http://www.rvantwisk.nl/     
skype: callto://r.vantwisk
Phone: +1-810-476-4196    Cell: +593 9901 7694                   SIP:  
+1-747-690-5133









More information about the TYPO3-english mailing list