Commit 00d5c1acd43201393665526666381e77b3b74578
1 parent
3dc6517a
Exists in
master
and in
29 other branches
tests if the invitation is a POST request
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/controllers/public/invite_controller.rb
@@ -58,7 +58,7 @@ class InviteController < PublicController | @@ -58,7 +58,7 @@ class InviteController < PublicController | ||
58 | 58 | ||
59 | def invite_registered_friend | 59 | def invite_registered_friend |
60 | contacts_to_invite = params['q'].split(',') | 60 | contacts_to_invite = params['q'].split(',') |
61 | - if !contacts_to_invite.empty? | 61 | + if !contacts_to_invite.empty? && request.post? |
62 | Delayed::Job.enqueue InvitationJob.new(user.id, contacts_to_invite, '', profile.id, nil, locale) | 62 | Delayed::Job.enqueue InvitationJob.new(user.id, contacts_to_invite, '', profile.id, nil, locale) |
63 | session[:notice] = _('Your invitations are being sent.') | 63 | session[:notice] = _('Your invitations are being sent.') |
64 | if profile.person? | 64 | if profile.person? |