Should memberId be set to member.getUserid() then we should check if this value is empty and use email?