/**
* Remove user attributes
*
* @param Newscoop\Entity\User $user
* @param array $attributes
*
* @return void
*/
public function removeAttributes(User $user, array $attributes)
{
foreach ($attributes as $attribute) {
if ($entity = $user->removeAttribute($attribute)) {
$this->em->remove($entity);
}
}
$this->em->flush();
}