FOSUserBundle
FOSUserBundle copied to clipboard
When changing email disable account and verify the new email
I think this should be done out-of-the-box in order to always have valid email addresses (if not why verifing only the first email?!) Would be really nice if implemented
Please be a bit patient. You opened it only 17 hours ago. I have a life outside the Symfony community too, and a job.
And btw, I agree that this feature could be useful. Do you mind contributing to implement it ?
@stof stof found a solution (without disabling the account)
in /profile/edit
when a user change his email display in the profile/edit page that a link for verification has been sent to his new email waiting for activation and keep the "old" email as main email till he verifies the new email
This procedure will be done if registration:confirmation is set to true in cofig, otherwise do as usual
I think that the above requires a db column for email_verified too
How you see this?
@amurdaca Where is the PR?
Can you supply a PR @runcom ?
I was thinking about this issue and a few thoughts cropped up. Locking users out of their account because they changed their email would be unexpected behavior for most projects and FOSUserBundle doesn't give any feedback why you can't access your account, nor does it currently offer the user to initiate a repeat email in case something went wrong.
We could make it optional to disable the account if the email is not verified, that would make it acceptable. I think that implementing this feature correctly would mean that an old email address should be saved as long as a new email address is in review. Maybe this feature is more suited for a user bundle with more advanced security policies?
I hope this feature implemented
#2612 (including the "update email confirmation"-feature) was unfortunately reverted. For anyone still interested in the "update email confirmation" feature: as FOSUserBundle does not move, I we implemented this feature as separate bundle. See https://github.com/azine/AzineEmailUpdateConfirmationBundle