]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Drop with_format and user the new :formats render option instead
[rails.git] / app / controllers / user_controller.rb
index 7b3b596df2b5f60957989b3816ae53470ccf6241..a591906976b93863760e8d80070a7fab79c9817c 100644 (file)
@@ -624,7 +624,7 @@ private
     cookies.permanent["_osm_username"] = user.display_name
 
     session[:user] = user.id
-    session_expires_after 1.month if session[:remember_me]
+    session_expires_after 28.days if session[:remember_me]
 
     target = session[:referer] || url_for(:controller => :site, :action => :index)
 
@@ -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