How to apply flags retrospectively for group subscriptions using Organic Groups? We've a large site running Drupal 7 with OG, Flag, Rules, etc.

OG uses a subscription model where you have to confirm you want to join a group (or leave a group) so we've decided to move to a Flag system that then uses rules to add (or remove) that user from the group.

All works great, except the site is already live and we have a lot of members in groups already, which obviously Flag doesn't recognise.

Is there a way to force Flag to check if a group subscription exists already?
I seem to understand from your question, that you're looking for a way to flag the existing members of an OG group.

If that's what you want, then a possible approach to make this work, is to process the results of a VBO enabled view via Rules, whereas your rule performs 2 Rules Actions:


load the VBO list of users (of an OG group) that you want to be processed.
add a loop to perform a Rules Action, whereas you just flag each user contained in your Views results.


For more details, have a look at the tutorial "How to process the results of a VBO enabled view via Rules?".

PS: if this is NOT what you want, by using this approach (anyway) I believe your question about "Is there a way to force Flag to check if a group subscription exists already?" became obsolete ...