Integer groupId, Integer[] roleIds, Integer[] channelIds,
Integer[] siteIds, Byte[] steps, Boolean[] allChannels,
CmsUserExt userExt) {
UnifiedUser unifiedUser = unifiedUserMng.save(username, email,
password, ip);
CmsUser user = new CmsUser();
user.forAdmin(unifiedUser, viewOnly, selfAdmin, rank);
CmsGroup group = null;
if (groupId != null) {
group = cmsGroupMng.findById(groupId);
} else {
group = cmsGroupMng.getRegDef();
}
if (group == null) {
throw new RuntimeException(
"register default member group not setted!");
}
user.setGroup(group);
user.init();
dao.save(user);
cmsUserExtMng.save(userExt, user);
if (roleIds != null) {
for (Integer rid : roleIds) {
user.addToRoles(cmsRoleMng.findById(rid));
}
}
if (channelIds != null) {
Channel channel;
for (Integer cid : channelIds) {