Skip to content

Commit

Permalink
fix logout error issue shane-tomlinson#92
Browse files Browse the repository at this point in the history
  • Loading branch information
krydos committed Mar 15, 2014
1 parent eaf24cd commit 34d0276
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions browserid.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
// script is run. Attach a live event (yuck) so that the user is still
// able to log out.
liveEvent(".js-persona__logout", "click", function(event) {
event.preventDefault();

ignoreLogout = false;
navigator.id.logout();
});
Expand Down Expand Up @@ -207,13 +205,6 @@
// the user leaving a comment but not being logged in. Either way,
// do not redirect the user, they are where they want to be.
if (ignoreLogout) return;

// There is a bug in Persona with Chrome. When a user signs in, the
// onlogout callback is first fired. Check if a user is actually
// signed in before redirecting to the logout URL.
if (browserid_common.loggedInUser) {
document.location = browserid_common.urlLogoutRedirect;
}
}
});

Expand Down
2 changes: 1 addition & 1 deletion browserid.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/browserid-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function Admin_toolbar_replace_logout_action($wp_toolbar) {
'id' => 'logout',
'title' => $this->logout_html,
'parent' => 'user-actions',
'href' => '#',
'href' => wp_logout_url(),
'meta' => array(
'class' => 'js-persona__logout'
)
Expand Down

0 comments on commit 34d0276

Please sign in to comment.