From 7df63b10edfb015f7cd4863ca5cf9b8e3b3b0e3a Mon Sep 17 00:00:00 2001 From: Selim Eser <2211482@stud.hs-mannheim.de> Date: Thu, 13 Jun 2024 12:23:56 +0200 Subject: [PATCH] change_user_details require correct password input in order to change --- src/main/java/de/hs_mannheim/domain/System.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hs_mannheim/domain/System.java b/src/main/java/de/hs_mannheim/domain/System.java index 66cec2a..3494cd1 100644 --- a/src/main/java/de/hs_mannheim/domain/System.java +++ b/src/main/java/de/hs_mannheim/domain/System.java @@ -171,7 +171,10 @@ public class System { return false; } - if(username.equals("")||password.equals("")||hometown.equals("")||zip.equals("")) + if(!current_user.getPassword().equals(password)) + return false; + + if(username.equals("")||hometown.equals("")||zip.equals("")) return false; for(User user: this.all_user)