]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/concerns/session_methods.rb
Merge remote-tracking branch 'upstream/pull/4683'
[rails.git] / app / controllers / concerns / session_methods.rb
index fca851eeb1e7b113ca38b9afbad9541bea7bc116..cebe932fc9862fae21c1cfdb13d93ffa82b4cd46 100644 (file)
@@ -62,9 +62,10 @@ module SessionMethods
   ##
   #
   def unconfirmed_login(user)
-    session[:token] = user.tokens.create.token
+    session[:pending_user] = user.id
 
-    redirect_to :controller => "confirmations", :action => "confirm", :display_name => user.display_name
+    redirect_to :controller => "confirmations", :action => "confirm",
+                :display_name => user.display_name, :referer => session[:referer]
 
     session.delete(:remember_me)
     session.delete(:referer)