Setting Invite function