function ad_permission_is_owner in Advertisement 5.2
File
- permission/
ad_permission.module, line 241 - Provide granular permissions for advertisements.
Code
function ad_permission_is_owner($aid, $account = NULL) {
global $user;
if (is_null($account)) {
$account = $user;
}
if (db_result(db_query('SELECT oid FROM {ad_owners} WHERE uid = %d AND aid = %d', $user->uid, $aid))) {
return 1;
}
else {
return 0;
}
}