[LoginEngine] making email editable but still unique

Despite what LoginEngine wants me to do in an ideal world, I want my
users to be able to change their email address, but I still want to
enforce uniqueness.

When I throw caution to the wind and add ‘email’ to :changeable_fields,
I can see why there’s a warning against doing this, and it’s not because
cats and dogs lie together. Instead, on updates, the
“validates_uniqueness_of :email” declaration in my model is ignored. All
of my other validations, including some I’ve added myself in the same
file are being called.

I’ve tied looking through the source. I’ve tried – in my overridden
do_edit() methods – to explicitly call #save_with_validation. It makes
no difference. Uniqueness is not being enforced.

Any thoughts?