function imagepicker_get_groups in Image Picker 5
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_get_groups()
- 6.2 imagepicker.functions.inc \imagepicker_get_groups()
- 7 imagepicker.functions.inc \imagepicker_get_groups()
get all the groups for the current user
6 calls to imagepicker_get_groups()
- imagepicker_browse_groups_form_submit in ./
imagepicker.module - Submit form
- imagepicker_group_images_form in ./
imagepicker.module - insert a form into the edit image page to allow the image to be associated with a group
- imagepicker_image_select in ./
imagepicker.module - imagepicker_user_view in ./
imagepicker.module - _imagepicker_browse in ./
imagepicker.module
File
- ./
imagepicker.module, line 1854 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function imagepicker_get_groups($account = FALSE) {
if ($account) {
$user = $account;
}
else {
global $user;
}
$result = db_query("SELECT * FROM {imagepicker_user_groups} WHERE uid = %d", array(
$user->uid,
));
while ($row = db_fetch_array($result)) {
$data[$row['gid']] = $row['group_name'];
}
return $data;
}