From: Tom Hughes Date: Fri, 27 Jul 2012 10:39:11 +0000 (+0100) Subject: Clear pass_crypt_confirmation when encrypting a new password X-Git-Tag: live~6406 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/07df3f9809404084435fae270d95f1d45b5f3dd6 Clear pass_crypt_confirmation when encrypting a new password If we change pass_crypt (by encrypting it) without clearing the confirmation then the user record becomes invalid. --- diff --git a/app/models/user.rb b/app/models/user.rb index b6c126076..8a594b01d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -233,6 +233,7 @@ private if pass_crypt_confirmation self.pass_salt = OSM::make_token(8) self.pass_crypt = OSM::encrypt_password(pass_crypt, pass_salt) + self.pass_crypt_confirmation = nil end end end