+logout working
This commit is contained in:
parent
d1a45681a2
commit
a53cccc52e
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,13 @@
|
|||
<ol>
|
||||
<li><a href="orders.xhtml">Meine Bestellungen</a></li>
|
||||
<li><a href="">Adressen und Konten</a></li>
|
||||
<h:form>
|
||||
<h:commandLink action="#{userBean.logout}">Abmelden</h:commandLink>
|
||||
<ui:remove>
|
||||
<li><a href="logout.xhtml">Abmelden</a></li>
|
||||
</ui:remove>
|
||||
</h:form>
|
||||
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
|
|
Loading…
Reference in New Issue