You are here

function activity_comment_delete_access in Activity 6

Menu access callback for activity_comment_delete page callback.

1 string reference to 'activity_comment_delete_access'
activity_menu in ./activity.module
Implementation of hook_menu().

File

./activity.module, line 183
activity.module

Code

function activity_comment_delete_access($acid) {
  global $user;
  if (user_access('administer activity')) {
    return TRUE;
  }
  $uid = db_result(db_query('SELECT uid FROM {activity_comments} WHERE acid = %d', $acid));
  if (user_access('delete activity') && $user->uid && $user->uid == $uid) {
    return TRUE;
  }
  return FALSE;
}