You are here

function _drupalchat_get_groups in DrupalChat 7.2

Same name and namespace in other branches
  1. 7 drupalchat.module \_drupalchat_get_groups()

Returns the groups to be used for filtering users

1 call to _drupalchat_get_groups()
_drupalchat_get_user_details in ./drupalchat.module

File

./drupalchat.module, line 1499
Module code for DrupalChat.

Code

function _drupalchat_get_groups($uid) {
  $groups = array();
  if (function_exists('og_get_groups_by_user')) {
    $og_groups = og_get_groups_by_user();
    if (isset($og_groups['node'])) {
      $groups = $og_groups['node'];
    }
  }
  return $groups;
}