function _imagepicker_user_has_img in Image Picker 7
Same name and namespace in other branches
- 5.2 imagepicker.module \_imagepicker_user_has_img()
- 5 imagepicker.module \_imagepicker_user_has_img()
- 6.2 imagepicker.functions.inc \_imagepicker_user_has_img()
Parameters
user object $account:
Return value
integer
3 calls to _imagepicker_user_has_img()
File
- ./
imagepicker.functions.inc, line 1270 - @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function _imagepicker_user_has_img($account = FALSE) {
if ($account) {
$user = $account;
}
else {
global $user;
}
$query = db_select('imagepicker', 'i');
$query
->addExpression('COUNT(i.img_id)', 'ct');
$query
->condition('i.uid', $user->uid);
$row = $query
->execute()
->fetchObject();
return $row->ct;
}