]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Use rails tokens for email changes
[rails.git] / app / models / user.rb
index 28a8d051ac73ee4c7f8694d58004a18871e299e7..958a03a9821220c3e4512b8b20d1352208e5fef1 100644 (file)
@@ -124,6 +124,10 @@ class User < ApplicationRecord
   before_save :update_tile
   after_save :spam_check
 
+  generates_token_for :new_email, :expires_in => 1.week do
+    fingerprint
+  end
+
   generates_token_for :password_reset, :expires_in => 1.week do
     fingerprint
   end