Group g = m_settingDao.getGroupCreateIfNotFound(resourceId, groups[i]);
Group g = m_settingDao.getGroupCreateIfNotFound(GROUP_RESOURCE_ID, groups[i]);
    public void addUser(AddUser addUser) throws RemoteException {        org.sipfoundry.sipxconfig.common.User myUser = new org.sipfoundry.sipxconfig.common.User();        User apiUser = addUser.getUser();                ApiBeanUtil.toMyObject(m_userBuilder, myUser, apiUser);        String[] groups = apiUser.getGroups();        String resourceId = org.sipfoundry.sipxconfig.common.User.GROUP_RESOURCE_ID;        for (int i = 0; groups != null && i < groups.length; i++) {            Group g = m_settingDao.getGroupCreateIfNotFound(resourceId, groups[i]);            myUser.addGroup(g);        }        myUser.setPin(addUser.getPin(), m_coreContext.getAuthorizationRealm());        m_coreContext.saveUser(myUser);    }