private function comment_delete($params)
{
$comment = $this->find($params['id']);
$commenter = $comment->getCommenter();
$user = $commenter->getUser();
if (!isset($user)) {
return;
}
$attribute_value = $user->getAttribute("comment_deleted");
$attribute_value = isset($attribute_value) ? $attribute_value + 1 : 1;
$user->addAttribute("comment_deleted", $attribute_value);
//have to remove points for a deleted comment.
$points_action = $this->em->getRepository('Newscoop\\Entity\\UserPoints')->getPointValueForAction("comment_delivered");
$points = $user->getPoints();
$user->setPoints($points - $points_action);
}