public boolean removeEmailAddress(User user, EmailAddress emailAddress)
{
ValidationUtils.assertNotNull(user, "user cannot be null");
ValidationUtils.assertNotNull(emailAddress, "emailAddress cannot be null");
UserEmailAddress existing = userEmailAddressDao.findByEmailAddress(emailAddress);
if (existing == null)
return false;
if (!existing.getUser().equals(user))
throw new OperationDisallowedException(user.toString() + " is not associated with email address " + emailAddress.getAddress());
userEmailAddressDao.delete(existing);
return true;
}