Title: Groups support for Relevanssi
Last modified: September 8, 2017

---

# Groups support for Relevanssi

 *  Resolved [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/groups-support-for-relevanssi/)
 * Hi,
 * I’m looking into adding Groups support in Relevanssi search plugin, so that the
   search would only return those posts the user is allowed to see.
 * Looks like this is the way to check whether a user is allowed to see a post, 
   am I right?
 *     ```
       $user = wp_get_current_user();
       $access = Groups_Post_Access::user_can_read_post($doc, $user->ID);
       ```
   
 * What would you suggest to be the best way to check whether Groups is installed
   or not?

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

 *  [gtsiokos](https://wordpress.org/support/users/gtsiokos/)
 * (@gtsiokos)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/groups-support-for-relevanssi/#post-9479038)
 * Hi Mikko,
 * Yes correct, you can check the user access that way. The method’s full description
   is in the [API](http://api.itthinx.com/groups/source-class-Groups_Post_Access.html#561-611).
 * In order to check if Groups is active, i would use
 *     ```
       $active_plugins = get_option( 'active_plugins', array() );
       $groups_is_active = in_array( 'groups/groups.php', $active_plugins );
       if ( $groups_is_active ) {
   
       }
       ```
   
 * or this
 *     ```
       if ( defined( 'GROUPS_CORE_VERSION' ) ) {
   
       }
       ```
   
 * Kind regards,
    George
 *  Thread Starter [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/groups-support-for-relevanssi/#post-9479171)
 * Thanks! Next versions of Relevanssi and Relevanssi Premium will include automatic
   support for Groups.

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

The topic ‘Groups support for Relevanssi’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups - Memberships and Access Control](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/groups-support-for-relevanssi/#post-9479171)
 * Status: resolved