]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Add geoip_database key to example configuration
[rails.git] / app / controllers / user_controller.rb
index 6b50798313db59b7196e8466348bc99ae07f562d..82373c90a791a7507977626967c25e1b2f2e5940 100644 (file)
@@ -268,7 +268,7 @@ class UserController < ApplicationController
   def logout
     @title = t "user.logout.title"
 
-    if params[:session] == request.session_options[:id]
+    if params[:session] == session.id
       if session[:token]
         token = UserToken.find_by(:token => session[:token])
         token.destroy if token
@@ -725,8 +725,8 @@ class UserController < ApplicationController
             # Ignore errors sending email
           end
         else
-          @user.errors.set(:new_email, @user.errors.get(:email))
-          @user.errors.set(:email, [])
+          @user.errors.add(:new_email, @user.errors[:email])
+          @user.errors.add(:email, [])
         end
 
         user.restore_email!