]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Preserve background colour when marking messages read/unread
[rails.git] / app / models / user.rb
index b6c126076bd29d5305a475c07b738e566cf7440a..1b9dd54e768e043a773e12615136fbb49138cfd6 100644 (file)
@@ -76,7 +76,7 @@ class User < ActiveRecord::Base
       user = nil
     end
 
-    token.update_attribute(:expiry, 1.week.from_now) if token and user
+    token.update_column(:expiry, 1.week.from_now) if token and user
 
     return user
   end 
@@ -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