From a19fd0dd8048820208c07d19a8cd3434a4c140f8 Mon Sep 17 00:00:00 2001 From: matteo Date: Tue, 19 Jul 2022 23:06:15 +0200 Subject: [PATCH] pulizia --- .../it/unipv/po/nsm/aerospin/controller/LoginController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/it/unipv/po/nsm/aerospin/controller/LoginController.java b/src/main/java/it/unipv/po/nsm/aerospin/controller/LoginController.java index ffba43d..1b8b48a 100644 --- a/src/main/java/it/unipv/po/nsm/aerospin/controller/LoginController.java +++ b/src/main/java/it/unipv/po/nsm/aerospin/controller/LoginController.java @@ -62,7 +62,7 @@ private void login() throws IOException { if(user != null) { String screen = null; Integer userType = user.getUserType(); - if (userType > screens.length - 1) screen = Factory.getAccount(); // TODO: Inve farà un eccezione qui + if (userType > screens.length - 1) screen = Factory.getAccount(); else screen = screens[userType]; myContainer.setScreen(screen); @@ -91,7 +91,7 @@ private void register() { User newUser = new User(); newUser.setEmail(email.getText()); newUser.setPwd(encryption.encrypt(pwd.getText())); - newUser.setUserType(0);//TODO: Creare l'enum + newUser.setUserType(0); service.persist(newUser); session.setUser(newUser); Alert alert = new Alert(Alert.AlertType.INFORMATION);