X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/88bf67b0923b1376ae6320597c70ce65e5fb1073..5275794aec3e4d06292db57afe6ee2e742be7b0b:/app/controllers/user_controller.rb
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 3622b037d..de07e4b53 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -336,6 +336,7 @@ class UserController < ApplicationController
token.destroy
session[:user] = user.id
+ cookies.permanent["_osm_username"] = user.display_name
if referer.nil?
flash[:notice] = t('user.confirm.success') + "
" + t('user.confirm.before you start')
@@ -388,6 +389,7 @@ class UserController < ApplicationController
end
token.destroy
session[:user] = @user.id
+ cookies.permanent["_osm_username"] = @user.display_name
redirect_to :action => 'account', :display_name => @user.display_name
else
flash[:error] = t 'user.confirm_email.failure'
@@ -615,6 +617,8 @@ private
##
# process a successful login
def successful_login(user)
+ cookies.permanent["_osm_username"] = user.display_name
+
session[:user] = user.id
session_expires_after 1.month if session[:remember_me]