reconfirmable option sending confirmation email to old address, not new one

653 views
Skip to first unread message

Larry

unread,
Feb 5, 2013, 9:49:24 PM2/5/13
to Devise
Hi,

I have been using Devise for quite some time - thanks a lot to
everyone who works on this gem! - and started using the
"reconfirmable" option as soon as it was available. It has always
worked fine and I have cucumber feature tests which have passed for
quite some time.

BTW, I'm using version 2.2.3 with Rails 3.2.11. It's been awhile since
I've tested this feature, so I'm not sure when the weird behavior
started. I'm pretty sure everything was fine after I went through the
fairly big changes required for updating to Devise 2.0.

Recently, though, my cukes started failing, because the re-
confirmation email is being sent to the old, original email address,
not the new one the user has just specified.

In my "devise.rb" I have "config.reconfirmable = true" and in my user
record I have an "unconfirmed_email" field.

When I ran the cukes I saw that the email was being delivered to the
old address, which caused my cukes to fail as they were expecting the
confirmation email to be sent to the new one.

I then fired up the app in development mode and sure enough, when I
attempted to change my email address a confirmation email was sent to
my old address, not the new one. Checking the database I see that the
"email" field contains my old address, and "unconfirmed_email"
contains the new one I just entered. The "confirmation_sent_at" and
"confirmation_token" fields are correct as well, reflecting that the
fact that reconfirmation is taking place.

So basically everything seems to be working as it should - except the
reconfirmation email is getting sent to the wrong address.

Has something changed that I'm not aware of? I've searched for quite
some time and can't find anything.

Thanks,
Laryr

latortuga

unread,
Feb 8, 2013, 10:59:26 AM2/8/13
to plataforma...@googlegroups.com
I'm not sure why it's doing that. My best guess would be that you have overridden the method that sends confirmation instructions:

Larry

unread,
Feb 13, 2013, 7:59:30 AM2/13/13
to plataforma...@googlegroups.com
Thanks for the reply. It turns out that I needed to update the devise-async gem as well. (I just did a "bundle update devise") I also had to list ":async" in my model (along with other Devise attributes) and remove the corresponding setting from my devise initialization file.
Reply all
Reply to author
Forward
0 new messages