[TYPO3-dev] user logoff log

Steffen Kamper steffen at sk-typo3.de
Mon Jul 30 23:47:22 CEST 2007


"Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag 
news:mailman.1.1184519607.6124.typo3-dev at lists.netfielders.de...
> Hi,
>
> i try to log the FE user logout. I have to know, which user loggs out.
> I tried several methods, at least i use the devlog hook, but for the 
> logout-action i'm too late everytime to identify.
>
> What is a possible solution for that ?
>
> vg  Steffen
>

so if anyone search for same:
i used the hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing']

and accessed the sessiontable to extract userid:
function logOff($params,$obj) {
        $res=$GLOBALS['TYPO3_DB']->exec_SELECTquery('*',
            $obj->session_table,
   'ses_id = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($obj->id, 
$obj->session_table).'
   AND ses_name = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($obj->name, 
$obj->session_table));
        $row=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
...
}

so all infos are accessible.

vg  Steffen







More information about the TYPO3-dev mailing list