cabennett85/gittest — Issue #1021: Manage Eventbrite accounts that get out of sync
Author: cabennett85
Created: 2012-03-02 00:31:16+00:00
State: open

A. make the code more robust
(old logic:
get key from eb account table
get password from password manager)

1. get key from eb account table

2. get password from password manager

3. get EB email username using key (we have to do this anyways since they might change email address)

4. if (EB email username != username from password manager) sync the two:

a. get EB user account using info from password manager. if login successful, that means these are two different accounts, so we should remove the mapping from the cause to the password info (but not delete the password info because it will leave the EB account orphaned - we need to delete that manually until they have API for it).

b. if login unsuccessful that means either the user changed the email or the password of their generated account. To determine which, try logging in again with the same password but with the email we obtained from the user_key. If login successful we should update the password info with the new email.

c. if this second login was unsuccessful that means they changed their password. In this case we can no longer manage their account with the password manager, so we should remove the mapping from the cause to the password info, and perhaps also delete the row in the password manager.

B. cleanup (optional)

1. Figure out all BC causes who's ebuid is out of sync with what the password manager table has.

2. For each of these, manually go to the generated account on EB using the password information from the password manager, and delete that account on EB

3. Delete the row in the password manager

Context:

Kate's BC account under kate@experienceproject.com is out of sync with respect to EB accounts

Her cause /prettywalls (cause id = 35) points to EB account table with (ebuid = 5)
the EB account this refers to is:

kate@experienceproject.com
userid 11876993
userkey 129911499911912623979

However, the BC password manager also has an account for this cause under

prettywalls@broadcause.com
userid 11876637
userkey 129911443511912266911

in other words, the account are out of sync. Every event that Kate creates is created with the userkey of kate@experienceproject.com, but her account links to prettywalls@broadcause.com.