On Thursday, July 5, 2012 at 3:39 PM, j.n. wrote:
send_on_create_confirmation_instructions
Hi.
I am trying to setup reconfirmable, so a user needs to reconfirm when changing his email address. Its a very nice feature, but I cant get it to work properly.
My setup is with devise 2.1.2 is:
user model:
attr_accessible :email, :password, :password_confirmation, :unconfirmed_email, ...
devise :invitable, :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :confirmable, :omniauthable
in the initilizer devise.rb:
config.reconfirmable = true
(config.allow_unconfirmed_access_for = 0.days)
(config.reset_password_within = 12.hours)
in the form the model field unconfirmed_email get set properly. I checked this through the console.
The first confirmation email, when a user registers on the page gets send out without problem.
I tried debugging the problem with adding this code to the initializers directory to overwrite the devise methode that it triggered as a after_update hook:
module Devise::Models::Confirmable
def send_on_create_confirmation_instructions
debugger
end
end
it seems like send_on_create_confirmation_instructions is never called, since I never get to the debugger.
Does anybody has experiences with this or was facing a similar problem?
Tankfull for any help,
Jan