actionIsAffectedBy(SecurityContext::AFFECT_NO_SCORING, SecurityContext::ACTION_USER_FOLLOW)) { $ur->addPoints( $this->container->getParameter('reputation_element_follow_value') ); } // Event de suivis $uea = new UserEventAction($user, $this->container); $event = $uea->proceed(Event::TYPE_USER_FOLLOW, $follower->getId()); $this->container->get('doctrine')->getEntityManager()->persist($event); } /** * L'utilisateur n'est plus suivit par un autre utilisateur * * @param User $user Utilisateur plus suivis */ public function removeFromFollow(User $user, User $old_follower) { $ur = new UserReputation($user); $security_context = new SecurityContext($old_follower); if (!$security_context->actionIsAffectedBy(SecurityContext::AFFECT_NO_SCORING, SecurityContext::ACTION_USER_FOLLOW)) { $ur->removePoints( $this->container->getParameter('reputation_element_follow_value') ); } } }