Send registration mail only if email settings true
This commit is contained in:
parent
740540de13
commit
05392701a9
1 changed files with 3 additions and 1 deletions
|
|
@ -74,7 +74,9 @@ class ConferenceRegistrationController < ApplicationController
|
||||||
if update_registration
|
if update_registration
|
||||||
redirect_message = "Registration updated."
|
redirect_message = "Registration updated."
|
||||||
else
|
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
|
end
|
||||||
redirect_to(register_conference_path(:id => conference.short_title), :notice => redirect_message)
|
redirect_to(register_conference_path(:id => conference.short_title), :notice => redirect_message)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue