Skip to content
Snippets Groups Projects
Commit 29faabb5 authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Only syncing emails if on manage page and if authenticated.

close #200
parent 7e43d79b
No related branches found
No related tags found
No related merge requests found
...@@ -35,20 +35,22 @@ ...@@ -35,20 +35,22 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
$(function() { $(function() {
if ($('#emailList')) { BrowserIDNetwork.checkAuth(function(authenticated) {
display_saved_ids(); if (authenticated) {
} $("body").addClass("authenticated");
if ($('#emailList').length) {
display_saved_ids();
}
}
});
}); });
function display_saved_ids() function display_saved_ids()
{ {
var emails = {}; var emails = {};
BrowserIDIdentities.checkAuthenticationAndSync(function(authenticated) { BrowserIDIdentities.syncIdentities(function() {
if (authenticated) { emails = getEmails();
$("body").addClass("authenticated"); displayEmails();
emails = getEmails();
displayEmails();
}
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment