From 9d4d7f50b5e1e4811c5dd6e42d2d42fe7163b96c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 2 Aug 2016 10:42:08 +0200 Subject: [PATCH] Continued a bit: (please cherry-pick) - sorted members - cleared also new flag in clear() method - set flag before the user instance is being submitted to EJB --- .../AddressbookAdminUserWebRequestBean.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java index 7a3a50d0..d389b29c 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java @@ -351,8 +351,9 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle encryptedPassword = UserUtils.encryptPassword(this.getUserPassword()); } - // Set user name + // Set user name and flag user.setUserName(this.getUserName()); + user.setUserMustChangePassword(this.getUserMustChangePassword()); // Is a password set? if (encryptedPassword != null) { @@ -371,23 +372,23 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle } @Override - public String getUserName () { - return this.userName; + public Boolean getUserMustChangePassword () { + return this.userMustChangePassword; } @Override - public void setUserName (final String userName) { - this.userName = userName; + public void setUserMustChangePassword (final Boolean userMustChangePassword) { + this.userMustChangePassword = userMustChangePassword; } @Override - public Boolean getUserMustChangePassword () { - return this.userMustChangePassword; + public String getUserName () { + return this.userName; } @Override - public void setUserMustChangePassword (final Boolean userMustChangePassword) { - this.userMustChangePassword = userMustChangePassword; + public void setUserName (final String userName) { + this.userName = userName; } @Override @@ -426,6 +427,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle this.setUserName(null); this.setUserPassword(null); this.setUserPasswordRepeat(null); + this.setUserMustChangePassword(null); } /** -- 2.39.5