function trigger_menu_unassign_access

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

trigger_menu()

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

Code

function trigger_menu_unassign_access() {
    if (!user_access('administer actions')) {
        return FALSE;
    }
    $count = db_select('trigger_assignments')->countQuery()
        ->execute()
        ->fetchField();
    return $count > 0;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.