]> git.openstreetmap.org Git - rails.git/commitdiff
Replace deprecated env method with request.env
authorTom Hughes <tom@compton.nu>
Mon, 5 Jun 2017 21:30:50 +0000 (22:30 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 5 Jun 2017 21:38:27 +0000 (22:38 +0100)
app/controllers/user_controller.rb

index 430051c1755771f14db594433d1dc3e7b5bd6faa..6b50798313db59b7196e8466348bc99ae07f562d 100644 (file)
@@ -496,7 +496,7 @@ class UserController < ApplicationController
   ##
   # omniauth success callback
   def auth_success
-    auth_info = env["omniauth.auth"]
+    auth_info = request.env["omniauth.auth"]
 
     provider = auth_info[:provider]
     uid = auth_info[:uid]
@@ -545,7 +545,7 @@ class UserController < ApplicationController
         when "pending" then
           unconfirmed_login(user)
         when "active", "confirmed" then
-          successful_login(user, env["omniauth.params"]["referer"])
+          successful_login(user, request.env["omniauth.params"]["referer"])
         when "suspended" then
           failed_login t("user.login.account is suspended", :webmaster => "mailto:#{SUPPORT_EMAIL}")
         else