HttpServletRequest request, ModelMap model) {
CmsSite site = CmsUtils.getSite(request);
String queryUsername = RequestUtils.getQueryParam(request,
"queryUsername");
String queryEmail = RequestUtils.getQueryParam(request, "queryEmail");
CmsUser currUser = CmsUtils.getUser(request);
WebErrors errors = validateEdit(id, request);
if (errors.hasErrors()) {
return errors.showErrorPage(model);
}
CmsUser admin = manager.findById(id);
CmsUserSite userSite = admin.getUserSite(site.getId());
List<CmsGroup> groupList = cmsGroupMng.getList();
List<CmsRole> roleList = cmsRoleMng.getList();
model.addAttribute("cmsAdmin", admin);
model.addAttribute("site", site);
model.addAttribute("userSite", userSite);
model.addAttribute("roleIds", admin.getRoleIds());
model.addAttribute("groupList", groupList);
model.addAttribute("roleList", roleList);
model.addAttribute("currRank", currUser.getRank());
model.addAttribute("queryUsername", queryUsername);