]> git.mxchange.org Git - addressbook-war.git/commitdiff
Some fixes: (please cherry-pick)
authorRoland Haeder <roland@mxchange.org>
Sat, 6 Aug 2016 20:16:43 +0000 (22:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 6 Aug 2016 21:39:09 +0000 (23:39 +0200)
- added missing import for MessageFormat
- renamed loginController to userLoginController as this is only for user logins

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java

index 13bc6bae3a5a0956aed1f93ca3c5ec6da928695c..ee23ecfcbe71c8e9399289ca8160c67f1179cfaf 100644 (file)
@@ -81,7 +81,7 @@ public class AddressbookEmailChangeWebSessionBean extends BaseAddressbookControl
         * Login bean (controller)
         */
        @Inject
-       private AddressbookUserLoginWebSessionController loginController;
+       private AddressbookUserLoginWebSessionController userLoginController;
 
        /**
         * Default constructor
@@ -106,7 +106,7 @@ public class AddressbookEmailChangeWebSessionBean extends BaseAddressbookControl
        @Override
        public String doChangeEmailAddress () {
                // This method shall only be called if the user is logged-in
-               if (!this.loginController.isUserLoggedIn()) {
+               if (!this.userLoginController.isUserLoggedIn()) {
                        // Not logged-in
                        throw new IllegalStateException("User is not logged-in"); //NOI18N
                } else if (!this.isRequiredChangeEmailAddressSet()) {
@@ -115,7 +115,7 @@ public class AddressbookEmailChangeWebSessionBean extends BaseAddressbookControl
                } else if (!Objects.equals(this.getEmailAddress(), this.getEmailAddressRepeat())) {
                        // Email address 1+2 mismatch
                        throw new FaceletException("Email address 1/2 are mismatching."); //NOI18N
-               } else if (!this.loginController.ifCurrentPasswordMatches()) {
+               } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
                        this.showFacesMessage("form_login_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
                        return ""; //NOI18N
@@ -125,7 +125,7 @@ public class AddressbookEmailChangeWebSessionBean extends BaseAddressbookControl
                }
 
                // Get user instance
-               User user = this.loginController.getLoggedInUser();
+               User user = this.userLoginController.getLoggedInUser();
 
                // It should be there, so run some tests on it
                assert (user instanceof User) : "Instance loginController.loggedInUser is null"; //NOI18N