function ad_is_owner in Advertisement 6
Same name and namespace in other branches
- 5 ad.module \ad_is_owner()
1 call to ad_is_owner()
- ad_access in ./
ad.module - Implementation of hook_access().
File
- owners/
ad_owners.module, line 309 - Enhances the ad module to support ad owners.
Code
function ad_is_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;
}
}