Send registration mail only if email settings true

This commit is contained in:
Chrisbr 2014-05-13 14:50:29 +02:00
parent 740540de13
commit 05392701a9

View file

@ -74,7 +74,9 @@ class ConferenceRegistrationController < ApplicationController
if update_registration
redirect_message = "Registration updated."
else
Mailbot.registration_mail(conference, current_user.person).deliver
if conference.email_settings.send_on_registration?
Mailbot.registration_mail(conference, current_user.person).deliver
end
end
redirect_to(register_conference_path(:id => conference.short_title), :notice => redirect_message)
end