Example #1
0
 public function updateUserClipsPrivacy($userId, $privacy)
 {
     if (!$userId || !mb_strlen($privacy)) {
         return false;
     }
     $clips = $this->clipDao->findByUserId($userId);
     if (!$clips) {
         return true;
     }
     $this->clipDao->updatePrivacyByUserId($userId, $privacy);
     $this->cleanListCache();
     $status = $privacy == 'everybody';
     $event = new OW_Event('base.update_entity_items_status', array('entityType' => 'video_rates', 'entityIds' => $clips, 'status' => $status));
     OW::getEventManager()->trigger($event);
     return true;
 }