X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Fuser_management%2Fsrc%2FuserProfile%2FuserProfile.jsx;h=a3fbced0a4d1dd7f1b7ea63413133f35c856414c;hb=c939d026fe2116d17370970e9359e93a440a5a5f;hp=67d55159e7c8dbb21d2fa3e40184480276051fc2;hpb=b5f45345dc77c112f4970d010febb7bb5a4335bd;p=osm%2FUI.git diff --git a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx index 67d55159e..a3fbced0a 100644 --- a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx +++ b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx @@ -38,7 +38,6 @@ class UserProfileDashboard extends React.Component { } componentWillMount() { this.Store.listen(this.updateState); - this.Store.getUsers(); } componentWillUnmount() { this.Store.unlisten(this.updateState); @@ -127,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; @@ -173,6 +176,7 @@ class UserProfileDashboard extends React.Component { render() { let self = this; + const User = this.context.userProfile || {}; let html; let props = this.props; let state = this.state; @@ -182,74 +186,64 @@ class UserProfileDashboard extends React.Component {