diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js index 30c601f180d..8dcc450f80e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js @@ -213,7 +213,7 @@ function removeUser(username) { } var removeUserAPI = apiBasePath + "/users/" + username; if (domain) { - url += '?domain=' + domain; + removeUserAPI += '?domain=' + domain; } $(modalPopupContent).html($('#remove-user-modal-content').html()); showPopup(); @@ -223,7 +223,11 @@ function removeUser(username) { removeUserAPI, function (data, textStatus, jqXHR) { if (jqXHR.status == 200) { - $("#user-" + username).remove(); + if (domain) { + $("#user-" + domain + "\\/" + username).remove(); + } else { + $("#user-" + username).remove(); + } // update modal-content with success message $(modalPopupContent).html($('#remove-user-success-content').html()); $("a#remove-user-success-link").click(function () { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js index a622f40543c..3d103689eeb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js @@ -67,7 +67,7 @@ $(document).ready(function () { changePasswordFormData["oldPassword"] = unescape((currentPassword)); changePasswordFormData["newPassword"] = unescape((newPassword)); - var changePasswordAPI = "/api/device-mgt/v1.0/users/" + user + "/credentials"; + var changePasswordAPI = "/api/device-mgt/v1.0/users/credentials"; invokerUtil.put( changePasswordAPI,