cp.addMember(pp, true); // Member status set to Pending
/////////////////////////////////////////////////////////////////////////////////////////////////
// TODO (INF-1214): Make this code more robust to handle changes to the community that need to
// Caleb: this means change update to $set
/////////////////////////////////////////////////////////////////////////////////////////////////
DbManager.getSocial().getCommunity().update(query, cp.toDb());
//send email out inviting user
CommunityApprovePojo cap = cp.createCommunityApprove(personIdStr,communityIdStr,"invite",userIdStr);
DbManager.getSocial().getCommunityApprove().insert(cap.toDb());