Skip to content

Commit

Permalink
Merge pull request #19749 from wordpress-mobile/fix/logout-jp-on-no-blog
Browse files Browse the repository at this point in the history
[Fix] Jetpack force logout on accounts with no sites
  • Loading branch information
alpavanoglu authored Dec 7, 2022
2 parents 1d7af78 + 3f88ce5 commit ffcf588
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions WordPress/Jetpack/Classes/System/JetpackWindowManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,8 @@ class JetpackWindowManager: WindowManager {

override func showUI(for blog: Blog?) {
if AccountHelper.isLoggedIn {
if AccountHelper.hasBlogs {
// If the user is logged in and has blogs sync'd to their account
showAppUI(for: blog)
return
} else {
// If the user doesn't have any blogs, but they're still logged in, log them out
// the `logOutDefaultWordPressComAccount` method will trigger the `showSignInUI` automatically
AccountHelper.logOutDefaultWordPressComAccount()
return
}
showAppUI(for: blog)
return
}

guard FeatureFlag.contentMigration.enabled else {
Expand Down

0 comments on commit ffcf588

Please sign in to comment.