You are here

function _imagepicker_user_has_img in Image Picker 5

Same name and namespace in other branches
  1. 5.2 imagepicker.module \_imagepicker_user_has_img()
  2. 6.2 imagepicker.functions.inc \_imagepicker_user_has_img()
  3. 7 imagepicker.functions.inc \_imagepicker_user_has_img()
1 call to _imagepicker_user_has_img()
imagepicker_groups_list in ./imagepicker.module

File

./imagepicker.module, line 1521
Enables permitted roles to upload images for insertion into configured nodes.

Code

function _imagepicker_user_has_img() {
  global $user;
  $num = 0;
  $result = db_query("SELECT img_id FROM {imagepicker} WHERE uid = '%d'", array(
    $user->uid,
  ));
  while ($row = db_fetch_array($result)) {
    $num++;
  }
  return $num;
}