When adding an email that's taken, clear browserid_user
authorFrancois Marier <francois@debian.org>
Mon, 23 Jul 2012 06:14:18 +0000 (18:14 +1200)
committerFrancois Marier <francois@debian.org>
Tue, 24 Jul 2012 06:21:01 +0000 (18:21 +1200)
commitf2b8772a0ac7766e7f4443c4c999e12914a2e940
tree9cf986fba593909dc23e068af0e7b20de3a2108f
parent8b4dff7bbd491366fd75fa1fd7309ff1992e6e4e
When adding an email that's taken, clear browserid_user

Because we are abusing the request() API to add alternate emails
to one's account, we need to make sure that BrowserID doesn't get
into a situation where it thinks that a user is logged whereas
that loging was aborted by Libravatar.

Therefore, when an add_email operation fail because another account
already has that email, Libravatar needs to silently log that user
out of BrowserID. Furthermore, it needs to clear its browserid_user
variable which is now out of sync with BrowserID's state.
libravatar/account/views.py
static/js/libravatar.js