Index: trunk/kernel/include/usersession.php =================================================================== diff -u -r2308 -r2385 --- trunk/kernel/include/usersession.php (.../usersession.php) (revision 2308) +++ trunk/kernel/include/usersession.php (.../usersession.php) (revision 2385) @@ -428,6 +428,11 @@ $this->GetNewSession(); $this->Set("PortalUserId",-1); $this->Update(); + + /*$db =& $this->adodbConnection; + $sql = 'UPDATE '.GetTablePrefix().'Visits SET PortalUserId = %s WHERE VisitId = %s'; + $db->Execute( sprintf($sql, $this->Get('PortalUserId'), $this->GetVariable('visit_id') ) );*/ + return true; } } @@ -507,8 +512,14 @@ $kSession = $app->recallObject('Session'); $kSession->SetField('GroupList', $extra_groups); $app->StoreVar('UserGroups', $this->Get('GroupList') ); + + $sql = 'UPDATE '.TABLE_PREFIX.'Visits SET PortalUserId = %s WHERE VisitId = %s'; + $app->DB->Query( sprintf($sql, $this->Get('PortalUserId'), $app->RecallVar('visit_id') ) ); } + + + $this->Set('LastAccessed', date('U') ); $this_login = $this->GetPersistantVariable("ThisLogin"); $this->SetPersistantVariable("LastLogin", $this_login);