diff --git a/client/app/settings/pages/accountInfo/accountInfo.coffee b/client/app/settings/pages/accountInfo/accountInfo.coffee index e5e828ea..88a41224 100644 --- a/client/app/settings/pages/accountInfo/accountInfo.coffee +++ b/client/app/settings/pages/accountInfo/accountInfo.coffee @@ -8,9 +8,6 @@ Template['settings_page_accountInfo'].events 'submit form': (event) -> event.preventDefault() - firstName = Helpers.nameCap $('#firstNameInput').val() - lastName = Helpers.nameCap $('#lastNameInput').val() - oldPass = $('#currentPassInput').val() mail = $('#mailInput').val().toLowerCase() @@ -18,11 +15,6 @@ Template['settings_page_accountInfo'].events newPass = $('#newPassInput').val() newPassRepeat = $('#newPassRepeatInput').val() - nameChanged = ( - profile = getUserField Meteor.userId(), 'profile' - profile.firstName isnt firstName or profile.lastName isnt lastName - ) - mailChanged = mail isnt getUserField Meteor.userId(), 'emails[0].address' passChanged = newPass isnt '' or newPassRepeat isnt '' needsPass = mailChanged or passChanged @@ -61,9 +53,6 @@ Template['settings_page_accountInfo'].events else callback not e? - if nameChanged - Meteor.call 'changeName', firstName, lastName, (e) -> callback not e? - if passChanged unless newPass is newPassRepeat setFieldError ( diff --git a/client/app/settings/pages/accountInfo/accountInfo.html b/client/app/settings/pages/accountInfo/accountInfo.html index acc265a4..09d4e958 100644 --- a/client/app/settings/pages/accountInfo/accountInfo.html +++ b/client/app/settings/pages/accountInfo/accountInfo.html @@ -1,14 +1,6 @@ diff --git a/lib/methods.coffee b/lib/methods.coffee index 66c340c3..a47a8e24 100644 --- a/lib/methods.coffee +++ b/lib/methods.coffee @@ -117,26 +117,6 @@ Meteor.methods $set: isRead: yes } - ###* - # @method changeName - # @param {String} firstName non empty string. - # @param {String} lastName non empty string. - ### - changeName: (firstName, lastName) -> - check firstName, String - check lastName, String - - firstName = Helpers.nameCap firstName.trim() - lastName = Helpers.nameCap lastName.trim() - - if firstName.length is 0 or lastName.length is 0 - throw new Meteor.Error 'name-empty' - - Meteor.users.update @userId, - $set: - 'profile.firstName': firstName - 'profile.lastName': lastName - ###* # @method saveMessageDraft # @param {Draft} draft