Login usage reporting (re-integrated from trunk)

SVN:1.0.2[1075]
This commit is contained in:
Romain Quetiez
2011-02-07 16:33:05 +00:00
parent f4bf026356
commit 999546e355

View File

@@ -326,6 +326,16 @@ EOF
{
// User is Ok, let's save it in the session and proceed with normal login
UserRights::Login($sAuthUser, $sAuthentication); // Login & set the user's language
if (MetaModel::GetConfig()->Get('log_usage'))
{
$oLog = new EventLoginUsage();
$oLog->Set('userinfo', UserRights::GetUser());
$oLog->Set('user_id', UserRights::GetUserObject()->GetKey());
$oLog->Set('message', 'Successful login');
$oLog->DBInsertNoReload();
}
$_SESSION['auth_user'] = $sAuthUser;
$_SESSION['login_mode'] = $sLoginMode;
}