示例#1
0
 public function userUnregister(OW_Event $e)
 {
     $params = $e->getParams();
     if (!isset($params['deleteContent']) || !$params['deleteContent']) {
         return;
     }
     $userId = (int) $params['userId'];
     $actions = $this->service->findActionsByUserId($userId);
     foreach ($actions as $action) {
         $this->service->removeAction($action->entityType, $action->entityId);
     }
     $this->service->removeLikesByUserId($userId);
     $this->service->removeActivityByUserId($userId);
 }