[TYPO3-dev] hook after user login

Krystian Szymukowicz t33k at prolabium.com
Thu Dec 15 08:58:54 CET 2011


W dniu 2011-12-15 00:04, Steffen Müller wrote:
> Hi.
>
> On 14.12.2011 21:33 Krystian Szymukowicz wrote:
>>
>> 2) I read that I can use:
>> $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauth.php'
>> ['postUserLookUp'][]
>>
>> but this is called everytime I refresh the page - even for not logged
>> user
>>
>
> according to the code comment, this hook was written for timtaw
> extension. so maybe you have a look at this implementation.
>
> in the hook you have pObj as second parameter, which provides
> $pObj->user(). This is an array with the current user.
>
> function postUserLookUp(&$params, &$pObj) {
> if (is_array($this->user))
> // add your logic here
> } else {
> return;
> }
> }
>
> Still not ideal in terms of performance, but "usual" practice in hooks.
>

Yes. I've been using this like that, but I thought there must be smth 
better for one time "after login hook" :)

-- 
grtz
Krystian Szymukowicz



More information about the TYPO3-dev mailing list