Skip to content

Commit

Permalink
Merge pull request #8516 from RocketChat/hotfix/cant-change-password
Browse files Browse the repository at this point in the history
Fix: Change password not working in new UI
  • Loading branch information
rodrigok committed Oct 17, 2017
2 parents 737abc3 + e0db8ce commit 88c8ae0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/rocketchat-ui-account/client/accountProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Template.accountProfile.helpers({
instance.dep.depend();
const realname = instance.realname.get();
const username = instance.username.get();
const password = instance.password.get();
const email = instance.email.get();
const usernameAvaliable = instance.usernameAvaliable.get();
const avatar = instance.avatar.get();
Expand All @@ -93,7 +94,7 @@ Template.accountProfile.helpers({
return;
}
}
if (!avatar && user.name === realname && user.username === username && user.emails[0].address === email) {
if (!avatar && user.name === realname && user.username === username && user.emails[0].address === email && !password) {
return ret;
}
if (!validateEmail(email) || (!validateUsername(username) || usernameAvaliable !== true) || !validateName(realname)) {
Expand Down Expand Up @@ -236,6 +237,7 @@ Template.accountProfile.onCreated(function() {
toastr.success(t('Profile_saved_successfully'));
swal.close();
instance.clearForm();
self.password.set();
}
if (error) {
toastr.remove();
Expand Down

0 comments on commit 88c8ae0

Please sign in to comment.