Wednesday 4 June 2014

felogin: actions to do after login

Sometimes inside a TYPO3 website after install and config felogin, we would like to do some actions everytime that user would acces to website. To do that, we can use an extension hook. In this example we use TYPO3 4.5.32 and 1.3.1 felogin.

Inside ext_localconf.php of our extension:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['login_confirmed'][] = 'EXT:test_extension/hooks/class.feloginhook.php:test_extension_hooksHandler->onLogin';

Inside class.feloginhook.php:

class test_extension_hooksHandler { public function onLogin() { // Actions to do here... Insert in a database, in a log... redirections... } }

Regards!