mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
[bug] incorrect behavior for the setting 'email confirmation required'
- when enabled: the user was still logged-in in the backend (F5 and he was logged in the frontend) - when disabled: the user was not logged in the frontend and received a message to confirm his/her email
This commit is contained in:
parent
7ffcd68fb7
commit
9c55b9d61f
@ -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
|
||||
|
@ -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?
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user