]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Merge oauth branch at r17138 to trunk.
[rails.git] / app / controllers / user_controller.rb
index 6f57f4f4abc3fef272128ce8c084555a9eff12a7..86b715154750dbd3d6203a846f4c471e2860b123 100644 (file)
@@ -112,8 +112,9 @@ class UserController < ApplicationController
       token = UserToken.find_by_token(params[:token])
 
       if token
       token = UserToken.find_by_token(params[:token])
 
       if token
+        @user = token.user
+
         if params[:user]
         if params[:user]
-          @user = token.user
           @user.pass_crypt = params[:user][:pass_crypt]
           @user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation]
           @user.active = true
           @user.pass_crypt = params[:user][:pass_crypt]
           @user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation]
           @user.active = true