function is_ad_owner in Advertisement 6.2
Same name and namespace in other branches
- 6.3 owners/ad_owners.module \is_ad_owner()
- 7 owners/ad_owners.module \is_ad_owner()
1 call to is_ad_owner()
- ad_access in ./
ad.module - Implementation of hook_access().
File
- owners/
ad_owners.module, line 357 - Enhances the ad module to support ad owners.
Code
function is_ad_owner($aid, $account = NULL) {
global $user;
if (!isset($account)) {
$account = $user;
}
if (db_result(db_query('SELECT oid FROM {ad_owners} WHERE uid = %d AND aid = %d', $account->uid, $aid))) {
return 1;
}
else {
return 0;
}
}