]> git.openstreetmap.org Git - rails.git/commitdiff
Update the username cookie when the display name is changed
authorTom Hughes <tom@compton.nu>
Sat, 3 Mar 2012 00:49:03 +0000 (00:49 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 3 Mar 2012 00:49:03 +0000 (00:49 +0000)
app/controllers/user_controller.rb

index 5c11a5c75b3cdea41dd0a37a9926cf70d4179473..a591906976b93863760e8d80070a7fab79c9817c 100644 (file)
@@ -663,6 +663,8 @@ private
     if user.save
       set_locale
 
+      cookies.permanent["_osm_username"] = user.display_name
+
       if user.new_email.blank?
         flash.now[:notice] = t 'user.account.flash update success'
       else