Making use of the M2 Invitation Code stored in _usermeta

Hello Gurus!

I have had a long thread running in the community about fitting M2 to our unusual membership model, and I’ve gotten some good suggestions. But new information as of today indicates that we were all operating on misinformation, and making this harder than it has to be. So with some new facts under my belt, my question has evolved into a support question, so here I am.

I want to understand the capabilities of M2 in grouping users by the invitation code they used to join their membership.

Since we’ll be giving groups of users the same invitation code, we would like a way to manage those members en masse, or list them all together. Such as….

– list all who have the same invitation code

– expire all who have the same invitation code

– reinstate all who have the same invitation code

I see that are entries in the _usermeta table for invitations, based on the custom post ID of the invitation code they used. I’m not sure what happens if someone changes their invitation code (i.e., signs up for a different membership with a different code)….do they have two associations in _usermeta? or just the most recent one? Likewise, what if they are in two memberships (via the add-on), that each require a different invitation code?

Would love to get these questions answered, and see what we can do with this association.