Hi,
I’ve got a bizarre, seemingly random error with my instance of
UserEngine or LoginEngine. It occurs sometimes when new users attempt
to signup to my application. The error message in the log files is
Unable to send confirmation E-Mail:
undefined method `+’ for nil:NilClass
To try and figure out what’s going on here I’ve copied and pasted some
methods from AuthenticatedUser within LoginEngine, and introduced my own
trace statements. It looks like it’s getting through to
new_security_token within AuthenticatedUser, but I believe it’s failing
on this line
write_attribute(‘security_token’,
AuthenticatedUser.hashed(self.salted_password + Time.now.to_i.to_s +
rand.to_s))
I’m guessing that the + has got something to do with no salted_password
being defined for the user…?
Has anyone encountered this before, or can think of a series of actions
that would cause a new user (during signup) to have no salted_password
created for them?
This is really bugging me, as the only way I’ve found to fix it is to
restart my app - and that’s hardly a fix.
And help or tips would be appreciated.
Thanks,
Hamish Rickerby
hamish [at] glimmerdesign.com
http://gotthegist.co.nz