about summary refs log tree commit diff
path: root/app/controllers/auth/setup_controller.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-04-22 10:06:11 +0200
committerClaire <claire.github-309c@sitedethib.com>2023-04-22 10:06:11 +0200
commitabfdafef1ededdb87f018414edd6b25fa9a70525 (patch)
tree7a9855d79d125333a6b1307215b73dd507475320 /app/controllers/auth/setup_controller.rb
parentf30c5e7f15f967019245d2c78f3c2e89800eb838 (diff)
parent4db8230194258a9a1c3d17d7261608515f3f2067 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/auth/setup_controller.rb`:
  Upstream removed a method close to a glitch-soc theming-related method.
  Removed the method like upstream did.
Diffstat (limited to 'app/controllers/auth/setup_controller.rb')
-rw-r--r--app/controllers/auth/setup_controller.rb19
1 files changed, 3 insertions, 16 deletions
diff --git a/app/controllers/auth/setup_controller.rb b/app/controllers/auth/setup_controller.rb
index db5a866f2..3ee35d141 100644
--- a/app/controllers/auth/setup_controller.rb
+++ b/app/controllers/auth/setup_controller.rb
@@ -11,15 +11,7 @@ class Auth::SetupController < ApplicationController
 
   skip_before_action :require_functional!
 
-  def show
-    flash.now[:notice] = begin
-      if @user.pending?
-        I18n.t('devise.registrations.signed_up_but_pending')
-      else
-        I18n.t('devise.registrations.signed_up_but_unconfirmed')
-      end
-    end
-  end
+  def show; end
 
   def update
     # This allows updating the e-mail without entering a password as is required
@@ -27,14 +19,13 @@ class Auth::SetupController < ApplicationController
     # that were not confirmed yet
 
     if @user.update(user_params)
-      redirect_to auth_setup_path, notice: I18n.t('devise.confirmations.send_instructions')
+      @user.resend_confirmation_instructions unless @user.confirmed?
+      redirect_to auth_setup_path, notice: I18n.t('auth.setup.new_confirmation_instructions_sent')
     else
       render :show
     end
   end
 
-  helper_method :missing_email?
-
   private
 
   def require_unconfirmed_or_pending!
@@ -53,10 +44,6 @@ class Auth::SetupController < ApplicationController
     params.require(:user).permit(:email)
   end
 
-  def missing_email?
-    truthy_param?(:missing_email)
-  end
-
   def set_pack
     use_pack 'auth'
   end