From a53cccc52e91cdd532d34924f528b74635ada83c Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Wed, 5 Jun 2019 13:22:52 +0200 Subject: [PATCH] +logout working --- src/main/java/de/hsel/itech/jsf/UserBean.java | 2 +- src/main/webapp/template.xhtml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/hsel/itech/jsf/UserBean.java b/src/main/java/de/hsel/itech/jsf/UserBean.java index 203a2f1..a0446cf 100644 --- a/src/main/java/de/hsel/itech/jsf/UserBean.java +++ b/src/main/java/de/hsel/itech/jsf/UserBean.java @@ -33,7 +33,6 @@ public class UserBean { @Getter private boolean error = false; - public String login() { Database db = Database.getInstance(); User user = db.user().get(username); @@ -56,6 +55,7 @@ public class UserBean { public String logout() { user = null; + loggedIn = false; return "index.html"; } diff --git a/src/main/webapp/template.xhtml b/src/main/webapp/template.xhtml index 0d3f8f2..13107e8 100644 --- a/src/main/webapp/template.xhtml +++ b/src/main/webapp/template.xhtml @@ -47,7 +47,13 @@
  1. Meine Bestellungen
  2. Adressen und Konten
  3. -
  4. Abmelden
  5. + + Abmelden + +
  6. Abmelden
  7. +
    +
    +