function imagepicker_has_grouplist in Image Picker 6.2
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_has_grouplist()
- 5 imagepicker.module \imagepicker_has_grouplist()
- 7 imagepicker.functions.inc \imagepicker_has_grouplist()
get how many groups
3 calls to imagepicker_has_grouplist()
- imagepicker_browse_admin_form in ./
imagepicker.functions.inc - list of images with bulk operations
- _imagepicker_browse in ./
imagepicker.functions.inc - _imagepicker_browse_admin in ./
imagepicker.functions.inc
File
- ./
imagepicker.functions.inc, line 1438 - Imagepicker functions
Code
function imagepicker_has_grouplist($account = FALSE) {
if ($account) {
$user = $account;
}
else {
global $user;
}
$ct = 0;
$result = db_query("\n SELECT DISTINCT g.gid\n FROM {imagepicker_user_groups} g, {imagepicker_group_images} i\n WHERE g.uid=%d AND g.gid = i.gid", array(
$user->uid,
));
while ($row = db_fetch_array($result)) {
$ct++;
}
return $ct;
}