]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/users_controller.rb
Merge remote-tracking branch 'upstream/pull/2028'
[rails.git] / app / controllers / users_controller.rb
index e382f153144b2beaa72592a9ef08155ea6b6fcf1..e41330c4b40306e808423796c70bf6ef5053a93f 100644 (file)
@@ -36,7 +36,7 @@ class UsersController < ApplicationController
   def save
     @title = t "users.new.title"
 
-    if params[:decline]
+    if params[:decline] || !(params[:read_tou] && params[:read_ct])
       if current_user
         current_user.terms_seen = true
 
@@ -47,8 +47,10 @@ class UsersController < ApplicationController
         else
           redirect_to :action => :account, :display_name => current_user.display_name
         end
-      else
+      elsif params[:decline]
         redirect_to t("users.terms.declined")
+      else
+        redirect_to :action => :terms
       end
     elsif current_user
       unless current_user.terms_agreed?