You are here

function activity_delete_access in Activity 6

Same name and namespace in other branches
  1. 6.2 activity.module \activity_delete_access()
  2. 7 activity.module \activity_delete_access()

Menu access callback for activity_delete page callback.

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

File

./activity.module, line 151
activity.module

Code

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