diff --git a/CHANGELOG.md b/CHANGELOG.md index 614564e39..b34e9aef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Fix a bug: missing translations - Fix a bug: the upgrade script report an invalid version to upgrade to - Fix a bug: invalid amount provided to the PayZen payment gateway when using a currency with anything else than 2 decimals +- Fix a bug: incorrect behavior for the setting "email confirmation required" - Updated @rails/webpacker to 5.4.3 - Updated react-refresh-webpack-plugin to 0.5.1 - Updated react-refresh to 0.10.0 diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 5ffe4e481..7ceee313d 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -20,7 +20,7 @@ class RegistrationsController < Devise::RegistrationsController # Allows sending the confirmation email without blocking the access to the dashboard resource.send_confirmation_instructions - sign_up(resource_name, resource) + sign_up(resource_name, resource) unless Setting.get('confirmation_required') respond_with resource, location: after_sign_up_path_for(resource) else set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_flashing_format? diff --git a/app/frontend/src/javascript/controllers/application.js.erb b/app/frontend/src/javascript/controllers/application.js.erb index f40702504..d456361d8 100644 --- a/app/frontend/src/javascript/controllers/application.js.erb +++ b/app/frontend/src/javascript/controllers/application.js.erb @@ -180,7 +180,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco }] }).result['finally'](null).then(function (res) { // when the account was created successfully, set the session to the newly created account - if(res.settings.confirmation_required) { + if(res.settings.confirmation_required === 'true') { Auth._currentUser = null; growl.info(_t('app.public.common.you_will_receive_confirmation_instructions_by_email_detailed')); } else { diff --git a/app/mailers/notifications_mailer.rb b/app/mailers/notifications_mailer.rb index 6e49d9d85..0dc51d356 100644 --- a/app/mailers/notifications_mailer.rb +++ b/app/mailers/notifications_mailer.rb @@ -24,6 +24,8 @@ class NotificationsMailer < NotifyWith::NotificationsMailer end send(notification.notification_type) + rescue StandardError => e + STDERR.puts "[NotificationsMailer] notification cannot be sent: #{e}" end def helpers