You are here

function _imagepicker_has_groups in Image Picker 6.2

Same name and namespace in other branches
  1. 5.2 imagepicker.module \_imagepicker_has_groups()
  2. 7 imagepicker.functions.inc \_imagepicker_has_groups()

how many groups

6 calls to _imagepicker_has_groups()
imagepicker_admin_view in ./imagepicker.admin.inc
imagepicker_browse_admin_form in ./imagepicker.functions.inc
list of images with bulk operations
imagepicker_image_select in ./imagepicker.functions.inc
imagepicker_user_view in ./imagepicker.user.inc
_imagepicker_browse in ./imagepicker.functions.inc

... See full list

File

./imagepicker.functions.inc, line 1523
Imagepicker functions

Code

function _imagepicker_has_groups($account = FALSE) {
  if (!variable_get('imagepicker_groups_enabled', 0)) {
    return 0;
  }
  if ($account) {
    $user = $account;
  }
  else {
    global $user;
  }
  $result = db_query("SELECT COUNT(gid) AS ct FROM {imagepicker_user_groups} WHERE uid = %d", array(
    $user->uid,
  ));
  $row = db_fetch_array($result);
  return $row['ct'];
}