Index: trunk/kernel/include/portaluser.php =================================================================== diff -u -r3282 -r3576 --- trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 3282) +++ trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 3576) @@ -25,15 +25,48 @@ $this->LoadFromDatabase($UserId); } + function Create() + { + $ret = parent::Create(); + if ($ret && $this->isLiveTable()) + { + $application =& kApplication::Instance(); + $sync_manager =& $application->recallObject('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize'); + $sync_manager->performAction('createUser', $this->Data); + } + return $ret; + } + + function Update($UpdatedBy = null, $modificationDate = null) + { + $ret = parent::Update($UpdatedBy, $modificationDate); + if ($ret && $this->isLiveTable()) + { + $application =& kApplication::Instance(); + $sync_manager =& $application->recallObject('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize'); + $sync_manager->performAction('updateUser', $this->Data); + } + return $ret; + } + function Delete() { global $objGroups, $objFavorites; - + $g = $objGroups->GetPersonalGroup($this->Get("Login")); - if(is_object($g)) - $g->Delete(); + if (is_object($g)) $g->Delete(); + $objFavorites->DeleteUser($this->Get("PortalUserId")); //delete favorites - parent::Delete(); + $ret = parent::Delete(); + + if($ret && $this->isLiveTable()) + { + $application =& kApplication::Instance(); + $sync_manager =& $application->recallObject('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize'); + $sync_manager->performAction('deleteUser', $this->Data); + } + + return $ret; } function RemoveFromAllGroups()