[TYPO3-dev] hook after user login

Steffen Müller typo3 at t3node.com
Thu Dec 15 00:04:36 CET 2011


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.

-- 
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Twitter: @t3node - http://twitter.com/t3node



More information about the TYPO3-dev mailing list