function trigger_menu_unassign_access in Drupal 7
Access callback: Determines if triggers can be unassigned.
Return value
bool TRUE if there are triggers that the user can unassign, FALSE otherwise.
See also
1 string reference to 'trigger_menu_unassign_access'
- trigger_menu in modules/
trigger/ trigger.module - Implements hook_menu().
File
- modules/
trigger/ trigger.module, line 86 - Enables functions to be stored and executed at a later time.
Code
function trigger_menu_unassign_access() {
if (!user_access('administer actions')) {
return FALSE;
}
$count = db_select('trigger_assignments')
->countQuery()
->execute()
->fetchField();
return $count > 0;
}