actually send email from admin interface inviter
This commit is contained in:
parent
c9af2e87aa
commit
b95c9b2e66
2 changed files with 2 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ class AdminsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_inviter
|
def admin_inviter
|
||||||
Invitation.create_invitee(:identifier => params[:identifier])
|
Invitation.create_invitee(:service => 'email', :identifier => params[:identifier])
|
||||||
flash[:notice] = "invitation sent to #{params[:identifier]}"
|
flash[:notice] = "invitation sent to #{params[:identifier]}"
|
||||||
redirect_to '/admins/user_search'
|
redirect_to '/admins/user_search'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ class Invitation < ActiveRecord::Base
|
||||||
opts[:from].save!
|
opts[:from].save!
|
||||||
invitee.reload
|
invitee.reload
|
||||||
end
|
end
|
||||||
|
puts (opts[:service] == 'email')
|
||||||
invitee.invite!(:email => (opts[:service] == 'email'))
|
invitee.invite!(:email => (opts[:service] == 'email'))
|
||||||
log_string = "event=invitation_sent to=#{opts[:identifier]} service=#{opts[:service]} "
|
log_string = "event=invitation_sent to=#{opts[:identifier]} service=#{opts[:service]} "
|
||||||
log_string << "inviter=#{opts[:from].diaspora_handle} inviter_uid=#{opts[:from].id} inviter_created_at_unix=#{opts[:from].created_at.to_i}" if opts[:from]
|
log_string << "inviter=#{opts[:from].diaspora_handle} inviter_uid=#{opts[:from].id} inviter_created_at_unix=#{opts[:from].created_at.to_i}" if opts[:from]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue