now you can not invite yourself. we have a bug as send_contact_request_to was taken out but Invitation still used it
This commit is contained in:
parent
7dce94814c
commit
c5f2e8bb2d
1 changed files with 1 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ class Invitation
|
|||
validates_presence_of :from, :to, :into
|
||||
|
||||
def self.invite(opts = {})
|
||||
return false if opts[:email] == opts[:from].email
|
||||
existing_user = User.find_by_email(opts[:email])
|
||||
if existing_user
|
||||
if opts[:from].contact_for(opts[:from].person)
|
||||
|
|
|
|||
Loading…
Reference in a new issue