Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

Commit 113af6d

Browse files
author
Shane Tomlinson
committed
Merge pull request #94 from KryDos/master
fix logout error issue #92
2 parents 221ea37 + 34d0276 commit 113af6d

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

browserid.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
// script is run. Attach a live event (yuck) so that the user is still
4040
// able to log out.
4141
liveEvent(".js-persona__logout", "click", function(event) {
42-
event.preventDefault();
43-
4442
ignoreLogout = false;
4543
navigator.id.logout();
4644
});
@@ -207,13 +205,6 @@
207205
// the user leaving a comment but not being logged in. Either way,
208206
// do not redirect the user, they are where they want to be.
209207
if (ignoreLogout) return;
210-
211-
// There is a bug in Persona with Chrome. When a user signs in, the
212-
// onlogout callback is first fired. Check if a user is actually
213-
// signed in before redirecting to the logout URL.
214-
if (browserid_common.loggedInUser) {
215-
document.location = browserid_common.urlLogoutRedirect;
216-
}
217208
}
218209
});
219210

browserid.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/browserid-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function Admin_toolbar_replace_logout_action($wp_toolbar) {
9696
'id' => 'logout',
9797
'title' => $this->logout_html,
9898
'parent' => 'user-actions',
99-
'href' => '#',
99+
'href' => wp_logout_url(),
100100
'meta' => array(
101101
'class' => 'js-persona__logout'
102102
)

0 commit comments

Comments
 (0)