actor.setEmail(user.getEmail());
// Persist the activities
final EntityManager em = OswPlugin.getEmFactory().createEntityManager();
em.getTransaction().begin();
PersistentActivityEntry oldEntry=em.find(PersistentActivityEntry.class, entry.getId());
if ((oldEntry==null) || (!oldEntry.getActor().getUri().equalsIgnoreCase(userJID)))
throw new UnauthorizedException();
Date published=oldEntry.getPublished();
entry.setPublished(published);
entry.setUpdated(Calendar.getInstance().getTime());
em.remove(oldEntry);