function comment_activity_access_grants in Activity 7
Same name and namespace in other branches
- 6.2 modules/comment.activity.inc \comment_activity_access_grants()
Implements hook_activity_access_grants().
File
- modules/
comment.activity.inc, line 25 - : Provides Activity access grant implementation for comment module.
Code
function comment_activity_access_grants($account) {
$grants = array();
$nodes_commented_on = db_query("SELECT nid FROM {comment} WHERE uid = :uid", array(
":uid" => $account->uid,
))
->fetchCol();
if (!empty($nodes_commented_on)) {
$grants['comment'] = $nodes_commented_on;
}
return $grants;
}