]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/users_controller.rb
Fix Lint/DuplicateBranch rubocop warnings
[rails.git] / app / controllers / users_controller.rb
index ea04e14f6a9d4757d693e547f8e8cbadd8c4d2b4..3489b4eda9e290c039f8cb61e4117b93bd08c267 100644 (file)
@@ -55,8 +55,8 @@ class UsersController < ApplicationController
     elsif current_user
       unless current_user.terms_agreed?
         current_user.consider_pd = params[:user][:consider_pd]
     elsif current_user
       unless current_user.terms_agreed?
         current_user.consider_pd = params[:user][:consider_pd]
-        current_user.tou_agreed = Time.now.getutc
-        current_user.terms_agreed = Time.now.getutc
+        current_user.tou_agreed = Time.now.utc
+        current_user.terms_agreed = Time.now.utc
         current_user.terms_seen = true
 
         flash[:notice] = t "users.new.terms accepted" if current_user.save
         current_user.terms_seen = true
 
         flash[:notice] = t "users.new.terms accepted" if current_user.save
@@ -73,8 +73,8 @@ class UsersController < ApplicationController
         current_user.description = "" if current_user.description.nil?
         current_user.creation_ip = request.remote_ip
         current_user.languages = http_accept_language.user_preferred_languages
         current_user.description = "" if current_user.description.nil?
         current_user.creation_ip = request.remote_ip
         current_user.languages = http_accept_language.user_preferred_languages
-        current_user.terms_agreed = Time.now.getutc
-        current_user.tou_agreed = Time.now.getutc
+        current_user.terms_agreed = Time.now.utc
+        current_user.tou_agreed = Time.now.utc
         current_user.terms_seen = true
 
         if current_user.auth_uid.blank?
         current_user.terms_seen = true
 
         if current_user.auth_uid.blank?
@@ -202,8 +202,10 @@ class UsersController < ApplicationController
   def set_status
     @user.activate! if params[:event] == "activate"
     @user.confirm! if params[:event] == "confirm"
   def set_status
     @user.activate! if params[:event] == "activate"
     @user.confirm! if params[:event] == "confirm"
+    @user.unconfirm! if params[:event] == "unconfirm"
     @user.hide! if params[:event] == "hide"
     @user.unhide! if params[:event] == "unhide"
     @user.hide! if params[:event] == "hide"
     @user.unhide! if params[:event] == "unhide"
+    @user.unsuspend! if params[:event] == "unsuspend"
     redirect_to user_path(:display_name => params[:display_name])
   end
 
     redirect_to user_path(:display_name => params[:display_name])
   end