Add primary email to emails even when skip_reconfirmation! called
Previously, in cases when skip_reconfirmation! was called before updating the primary email, the email (which is to be considered confirmed) would not be added to the emails table, because `User#confirm` was not called. Now instead of overriding `User#confirm` we use an `after_save` callback that checks if the primary email changed and if it is confirmed, and if so adds it to the emails. This works also in case skip_reconfirmation is called, and is also cleaner than overriding a Devise method.
Showing
Please register or sign in to comment