UWFlow/rmc — pull request #190 by jswu (2014-07-17 16:17:21+00:00)
Title: Partial Facebook login support for email users

Fixed up the code from #181 to ignore `None` emails (e.g. create a new account for them). We know that this will be a new user because:

1. If a user already signed in with Facebook before, then their fbid would have matched earlier on in the function
1. A user cannot create account with a `None` email

Lines 406 and 416 were added in this change compared to #181.

### Why does this happen
Emails are sometimes not returned by the API for a variety of reasons including signing up with only phone number or not having confirmed their email. More info here: https://developers.facebook.com/bugs/298946933534016

### Testing
1. Set the `email` to `None` right before that block of code
1. Log in with a test Facebook user

Before this change, the user would be logged in as some existing user. After the change, a new account is created. This was verified by checking the user objects in the devshell.

Also retested the case where the test Facebook user already has an account with their email, but no fbid associated with that account. Verified that after signing in with Facebook, the old account is used for the current session and gets assigned the new fbid (instead of throwing a NotUniqueError like it does now).