Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r3484 -r3576 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 3484) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 3576) @@ -76,11 +76,13 @@ $event->status = erFAIL; } - $next_template = $this->Application->GetVar('next_template'); - if($next_template) $event->redirect = $next_template; - if ($this->Application->ConfigValue('UseJSRedirect')) { - $event->SetRedirectParam('js_redirect', 1); - } + $next_template = $this->Application->GetVar('next_template'); + if($next_template) $event->redirect = $next_template; + if ($this->Application->ConfigValue('UseJSRedirect')) { + $event->SetRedirectParam('js_redirect', 1); + } + $sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize'); + $sync_manager->performAction('LoginUser', $object->GetDBField('Login'), $password); } else { @@ -101,11 +103,26 @@ */ function OnInpLogin(&$event) { - + $sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize'); + $sync_manager->performAction('LoginUser', $event->getEventParam('user'), $event->getEventParam('pass') ); } + /** + * Called when user logs in using old in-portal + * + * @param kEvent $event + */ + function OnInpLogout(&$event) + { + $sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize'); + $sync_manager->performAction('LogoutUser'); + } + function OnLogout(&$event) { + $sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize'); + $sync_manager->performAction('LogoutUser'); + $session =& $this->Application->recallObject('Session'); $session->SetField('PortalUserId', -2); $this->Application->SetVar('u_id', -2);