Sharing Content by Emails

From ExtractValue Wiki

Jump to: navigation, search

Brief Description

When a logged in user is browsing the site, and clicks to share content with someone else. We have a form that asks for email address(es) and custom message. Then, we email a message to the email(s) provided with a link to that page.

Behind the scenes, we are taking these emails and storing it into the invitee table. We're also creating a relationship between the user and this invitee in case the invitee decides to join later.

Backend Logic to Save Invitee From Emails

  1. Check to see if the email entered is already in users table
    1. If they are, do nothing for now... Perhaps later we can try to pair them as friends if they aren't already.
  2. Check to see if the email entered is already in invitee table
    1. If they are not, add the email address into invitee table with provider='manual', provider_type='email', and contact_name=
  3. Check to see if there is a user_invitee relationship
    1. If there isn't, create a user_invitee relationship
  4. Save information into the user_invitee_share table
    1. user_id, invitee_id, object_id, object_type, etc.