function _imagepicker_has_groups in Image Picker 5.2
Same name and namespace in other branches
- 6.2 imagepicker.functions.inc \_imagepicker_has_groups()
- 7 imagepicker.functions.inc \_imagepicker_has_groups()
5 calls to _imagepicker_has_groups()
File
- ./
imagepicker.module, line 2536 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function _imagepicker_has_groups($account = FALSE) {
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'];
}