Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #4383/ceba5a3f backport][stable-4.8] logout: reload user info after logout, instead of assuming null #4386

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/2726.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
logout: reload user info after logout, instead of assuming null
6 changes: 5 additions & 1 deletion src/loaders/standalone/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ export const StandaloneLayout = ({
<DropdownItem
key='logout'
aria-label={'logout'}
onClick={() => ActiveUserAPI.logout().then(() => setUser(null))}
onClick={() =>
ActiveUserAPI.logout()
.then(() => ActiveUserAPI.getUser().catch(() => null))
.then((user) => setUser(user))
}
>
{t`Logout`}
</DropdownItem>,
Expand Down