summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/SessionPage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/SessionPage.java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SessionPage.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/SessionPage.java b/src/main/java/com/gitblit/wicket/pages/SessionPage.java
index 909342ae..7a58175f 100644
--- a/src/main/java/com/gitblit/wicket/pages/SessionPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/SessionPage.java
@@ -56,8 +56,8 @@ public abstract class SessionPage extends WebPage {
// any changes to permissions or roles (issue-186)
UserModel user = app().users().getUserModel(session.getUser().username);
- if (user.disabled) {
- // user was disabled during session
+ if (user == null || user.disabled) {
+ // user was deleted/disabled during session
HttpServletResponse response = ((WebResponse) getRequestCycle().getResponse())
.getHttpServletResponse();
app().authentication().logout(response, user);