Skip to content

Commit

Permalink
Merge pull request #31 from ouranos/feature/fix-invite
Browse files Browse the repository at this point in the history
Fix error when sending invite to unconfirmed email
  • Loading branch information
ouranos committed May 19, 2016
2 parents 6838204 + 6528745 commit f8d7e1f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def deletion_request_instructions(record, deletion_request)
protected

def recipient(record, new_user = false)
hash = { email: record.email }
# Org Invite for unconfirmed users will have the email in #unconfirmed_email
hash = { email: record.email || record.unconfirmed_email }
hash[:name] = "#{record.name} #{record.surname}".strip unless new_user
hash
end
Expand Down

0 comments on commit f8d7e1f

Please sign in to comment.