@@ 61-70 (lines=10) @@ | ||
58 | end |
|
59 | end |
|
60 | ||
61 | def send_user_demoted_email(user, role) |
|
62 | begin |
|
63 | return unless Rails.configuration.enable_email_verification |
|
64 | ||
65 | UserMailer.user_demoted(user, role, root_url, @settings).deliver_now |
|
66 | rescue => e |
|
67 | logger.error "Support: Error in email delivery: #{e}" |
|
68 | flash[:alert] = I18n.t(params[:message], default: I18n.t("delivery_error")) |
|
69 | end |
|
70 | end |
|
71 | ||
72 | # Sends inivitation to join |
|
73 | def send_invitation_email(name, email, token) |
|
@@ 50-59 (lines=10) @@ | ||
47 | end |
|
48 | end |
|
49 | ||
50 | def send_user_promoted_email(user, role) |
|
51 | begin |
|
52 | return unless Rails.configuration.enable_email_verification |
|
53 | ||
54 | UserMailer.user_promoted(user, role, root_url, @settings).deliver_now |
|
55 | rescue => e |
|
56 | logger.error "Support: Error in email delivery: #{e}" |
|
57 | flash[:alert] = I18n.t(params[:message], default: I18n.t("delivery_error")) |
|
58 | end |
|
59 | end |
|
60 | ||
61 | def send_user_demoted_email(user, role) |
|
62 | begin |