Change password requires all fields to be input before checking equivalence.
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Thu, 27 Apr 2017 18:57:46 +0000 (14:57 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Thu, 27 Apr 2017 18:57:46 +0000 (14:57 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/user_management/src/dashboard/dashboard.jsx
skyquake/plugins/user_management/src/userProfile/userProfile.jsx

index a3b6a63..cb6b9a0 100644 (file)
@@ -132,6 +132,10 @@ class UserManagementDashboard extends React.Component {
             let newOne = state['new-password'];
             let confirmOne = state['confirm-password'];
             if(true) {
+                if(!oldOne || !newOne) {
+                     self.props.actions.showNotification('Please fill in all fields.');
+                    return false;
+                }
                 if(oldOne == newOne) {
                     self.props.actions.showNotification('Your new password must not match your old one');
                     return false;
index a786858..a3fbced 100644 (file)
@@ -126,6 +126,10 @@ class UserProfileDashboard extends React.Component {
             let newOne = state['new-password'];
             let confirmOne = state['confirm-password'];
             if(true) {
+                if(!oldOne || !newOne) {
+                     self.props.actions.showNotification('Please fill in all fields.');
+                    return false;
+                }
                 if(oldOne == newOne) {
                     self.props.actions.showNotification('Your new password must not match your old one');
                     return false;