Skip to content

Commit

Permalink
Fixed bug 3351 and made sure you are not logged out due to pressing
Browse files Browse the repository at this point in the history
cancel in preferences (if logged in when opening preferences)
  • Loading branch information
KlasJoensson committed Sep 24, 2012
1 parent 58cc172 commit a6b6140
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -224,10 +224,10 @@ public boolean performOk() {

IUserManager userManager = Activator.getDefault().getUserManager();
userManager.persist();
userManager.switchUserContainer(sandBoxUserContainer);
if (loggedInUser == null) {
/* There where on one logged in when opening the page, so if any one
* are logged in now let's log any one logged-in out*/
userManager.switchUserContainer(sandBoxUserContainer);
userManager.logOut();
}
prefStore.setValue( Activator.PROMPT_ON_LOGOUT, !propOnLogoutButton.getSelection() );
Expand All @@ -243,7 +243,11 @@ public boolean performOk() {

@Override
public boolean performCancel() {
Activator.getDefault().getUserManager().logOut();
if (loggedInUser == null) {
/* There where on one logged in when opening the page, so if any one
* are logged in now let's log any one logged-in out*/
Activator.getDefault().getUserManager().logOut();
}
return super.performCancel();
}

Expand Down

0 comments on commit a6b6140

Please sign in to comment.