]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/users_controller.rb
Drop duplicate unconfirmed_login definition
[rails.git] / app / controllers / users_controller.rb
index e3d5173a785f8510207194e9c9b5c38a1b166e46..38a61208c4635120ea9864a65dfd360728914baa 100644 (file)
@@ -277,15 +277,15 @@ class UsersController < ApplicationController
     name = auth_info[:info][:name]
     email = auth_info[:info][:email]
 
     name = auth_info[:info][:name]
     email = auth_info[:info][:email]
 
-    case provider
-    when "openid"
-      email_verified = uid.match(%r{https://www.google.com/accounts/o8/id?(.*)}) ||
+    email_verified = case provider
+                     when "openid"
+                       uid.match(%r{https://www.google.com/accounts/o8/id?(.*)}) ||
                        uid.match(%r{https://me.yahoo.com/(.*)})
                        uid.match(%r{https://me.yahoo.com/(.*)})
-    when "google", "facebook"
-      email_verified = true
-    else
-      email_verified = false
-    end
+                     when "google", "facebook"
+                       true
+                     else
+                       false
+                     end
 
     if settings = session.delete(:new_user_settings)
       current_user.auth_provider = provider
 
     if settings = session.delete(:new_user_settings)
       current_user.auth_provider = provider
@@ -341,17 +341,6 @@ class UsersController < ApplicationController
 
   private
 
 
   private
 
-  ##
-  #
-  def unconfirmed_login(user)
-    session[:token] = user.tokens.create.token
-
-    redirect_to :action => "confirm", :display_name => user.display_name
-
-    session.delete(:remember_me)
-    session.delete(:referer)
-  end
-
   ##
   # update a user's details
   def update_user(user, params)
   ##
   # update a user's details
   def update_user(user, params)