function imagepicker_has_grouplist in Image Picker 5.2
Same name and namespace in other branches
- 5 imagepicker.module \imagepicker_has_grouplist()
- 6.2 imagepicker.functions.inc \imagepicker_has_grouplist()
- 7 imagepicker.functions.inc \imagepicker_has_grouplist()
2 calls to imagepicker_has_grouplist()
File
- ./
imagepicker.module, line 3080 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function imagepicker_has_grouplist($account = FALSE) {
if ($account) {
$user = $account;
}
else {
global $user;
}
$result = db_query("\n SELECT DISTINCT g.gid, g.group_name\n FROM {imagepicker_user_groups} g, {imagepicker_group_images} i\n WHERE g.uid=%d AND g.gid = i.gid", array(
$user->uid,
));
$ct = 0;
while ($row = db_fetch_array($result)) {
$ct++;
}
return $ct;
}