Group group = Group.find(context, Integer.parseInt(ref.getId()));
AuthorizeManager.authorizeAction(context, group, Constants.WRITE);
if (group != null) {
EPerson ePerson = EPerson.find(context, Integer.parseInt(id));
if (ePerson != null) {
group.addMember(ePerson);
group.update();
} else {
throw new IllegalArgumentException("Invalid id:" + ref.getId());
}
} else {