function imagepicker_get_user_group_state in Image Picker 6.2
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_get_user_group_state()
- 5 imagepicker.module \imagepicker_get_user_group_state()
- 7 imagepicker.functions.inc \imagepicker_get_user_group_state()
get the gid of the selected group
3 calls to imagepicker_get_user_group_state()
- imagepicker_browse_admin_form in ./
imagepicker.functions.inc - list of images with bulk operations
- imagepicker_group_images_form_submit in ./
imagepicker.functions.inc - Submit group images form
- _imagepicker_browse in ./
imagepicker.functions.inc
File
- ./
imagepicker.functions.inc, line 1379 - Imagepicker functions
Code
function imagepicker_get_user_group_state($state = 1, $account = FALSE) {
if ($account) {
$user = $account;
}
else {
global $user;
}
$result = db_query("SELECT gid FROM {imagepicker_user_groups} WHERE state=%d AND uid=%d", array(
$state,
$user->uid,
));
$ct = 0;
while ($row = db_fetch_array($result)) {
$data[] = $row['gid'];
$ct++;
}
if ($ct) {
return $data;
}
return FALSE;
}