From 6d221dc82c98de85f86133ea7c4e6a144a62bb9e Mon Sep 17 00:00:00 2001 From: Justin Ahn Date: Sat, 5 Sep 2015 00:13:25 -0700 Subject: [PATCH 1/3] changing username by admin --- client/views/admin/users/adminUserEdit.coffee | 3 ++- client/views/admin/users/adminUserEdit.html | 4 ++++ packages/rocketchat-lib/server/methods/updateUser.coffee | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/views/admin/users/adminUserEdit.coffee b/client/views/admin/users/adminUserEdit.coffee index 569d7a668307..c14fc4d1e49f 100644 --- a/client/views/admin/users/adminUserEdit.coffee +++ b/client/views/admin/users/adminUserEdit.coffee @@ -23,12 +23,13 @@ Template.adminUserEdit.onCreated -> @save = -> userData = { _id: Template.currentData()._id } userData.name = $("#name", ".edit-form").val() + userData.username = $("#username", ".edit-form").val() unless userData._id and userData.name toastr.error TAPi18next.t 'project:The_field_is_required', TAPi18next.t 'project:Name' else Meteor.call 'updateUser', userData, (error, result) -> - if result + if result toastr.success t('User_updated_successfully') instance.cancel() if error diff --git a/client/views/admin/users/adminUserEdit.html b/client/views/admin/users/adminUserEdit.html index f74026430b50..d00a9875e0c0 100644 --- a/client/views/admin/users/adminUserEdit.html +++ b/client/views/admin/users/adminUserEdit.html @@ -6,6 +6,10 @@

{{name}}

+
+ + +