Title: Quick coding question
Last modified: August 30, 2016

---

# Quick coding question

 *  Resolved [Pascal Casier](https://wordpress.org/support/users/casiepa/)
 * (@casiepa)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/quick-coding-question-1/)
 * Hi Robin,
    I have been working on this plugin to get the overview of users and
   what forums they are subscribed to ([https://wordpress.org/plugins/bbp-manage-subscriptions/](https://wordpress.org/plugins/bbp-manage-subscriptions/)).
   I’m now linking to your plugin as it’s also used on the forum of the association
   I’m helping. What would be the best way to check the link between a forum and
   a private group ? I would use this to indicate ‘mistakes’ where people are subscribed
   to a forum but are not in your private group. Thanks, Pascal.
 * [https://wordpress.org/plugins/bbp-private-groups/](https://wordpress.org/plugins/bbp-private-groups/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/quick-coding-question-1/#post-6480493)
 * so you would be looping through users or looping through forums?
 *  Thread Starter [Pascal Casier](https://wordpress.org/support/users/casiepa/)
 * (@casiepa)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/quick-coding-question-1/#post-6480500)
 * Hi Robin,
    I’m looping through users. For every user I already know to what bbpress
   forums he is subscribed and to what private groups he belongs to. My idea was
   to create an array with the link between forums and bbp-private-group(s), then
   I can check into that. Pascal.
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/quick-coding-question-1/#post-6480503)
 * Without getting heavily involved I’m not sure I can help, and at the moment I
   am fully tied up with work elsewhere.
 * There’s probably a clever way to do this, but personally I’d keep it simple and
   for each user have the array of forums and the array of private groups.
 * I’d then loop through forums array and check if each has a group (forum subscribed
   where user doesn’t have private group)
 * Then I’d loop through private groups to create a list of subscribed forums that
   are not in private groups
 *  Thread Starter [Pascal Casier](https://wordpress.org/support/users/casiepa/)
 * (@casiepa)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/quick-coding-question-1/#post-6480504)
 * OK, I’ll give it a try, thanks for the reponse !

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Quick coding question’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bbp-private-groups.svg)
 * [Private groups](https://wordpress.org/plugins/bbp-private-groups/)
 * [Support Threads](https://wordpress.org/support/plugin/bbp-private-groups/)
 * [Active Topics](https://wordpress.org/support/plugin/bbp-private-groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bbp-private-groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bbp-private-groups/reviews/)

## Tags

 * [Coding](https://wordpress.org/support/topic-tag/coding/)

 * 4 replies
 * 2 participants
 * Last reply from: [Pascal Casier](https://wordpress.org/support/users/casiepa/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/quick-coding-question-1/#post-6480504)
 * Status: resolved