group = context.portal_groups.getGroupById('MyGroup') group.addMember(username)