You are here

function imagepicker_has_groups in Image Picker 6.2

Same name and namespace in other branches
  1. 7 imagepicker.functions.inc \imagepicker_has_groups()

count of groups per user

File

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

Code

function imagepicker_has_groups($account = FALSE) {
  if ($account) {
    $user = $account;
  }
  else {
    global $user;
  }
  $result = db_query("SELECT count(gid) as gidct FROM {imagepicker_user_groups} WHERE uid = %d", array(
    $user->uid,
  ));
  $row = db_fetch_array($result);
  return $row['gidct'];
}