You are here

function filedepot_og_get_user_groups in filedepot 7

3 calls to filedepot_og_get_user_groups()
filedepot_getGroupOptions in ./lib-common.php
nexcloud::get_itemperms in ./nexcloud.class.php
template_preprocess_filedepot_tagcloud in ./filedepot.module

File

./lib-common.php, line 322
lib-common.php Common library of functions for the applications

Code

function filedepot_og_get_user_groups() {
  global $user;
  $retval = array();
  $groups = og_get_entity_groups('user', $user);
  if (is_array($groups) and count($groups) > 0) {
    if (function_exists('og_get_group')) {
      $retval = $groups;
    }
    else {
      $retval = $groups['node'];
    }
  }
  return $retval;
}