You are here

function hook_webform_submission_query_access_alter in Webform 6.x

Same name and namespace in other branches
  1. 8.5 webform.api.php \hook_webform_submission_query_access_alter()

Alter webform submission query access.

Parameters

\Drupal\Core\Database\Query\AlterableInterface $query: An Query object describing the composite parts of a SQL query.

array $webform_submission_tables: An array webform submission tables that contains the table's alias and OR conditions which are used to build the alter query.

See also

webform_query_webform_submission_access_alter()

3 functions implement hook_webform_submission_query_access_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

webform_access_webform_submission_query_access_alter in modules/webform_access/webform_access.module
Implements hook_webform_submission_query_access_alter().
webform_group_webform_submission_query_access_alter in modules/webform_group/webform_group.module
Implements hook_webform_submission_query_access_alter().
webform_node_webform_submission_query_access_alter in modules/webform_node/webform_node.module
Implements hook_webform_submission_query_access_alter().
1 invocation of hook_webform_submission_query_access_alter()
webform_query_webform_submission_access_alter in includes/webform.query.inc
Implements hook_query_TAG_alter().

File

./webform.api.php, line 734
Hooks related to Webform module.

Code

function hook_webform_submission_query_access_alter(\Drupal\Core\Database\Query\AlterableInterface $query, array $webform_submission_tables) {

  // Always allow the current user access to their submissions.
  foreach ($webform_submission_tables as $table) {
    $table['condition']
      ->condition($table['alias'] . '.uid', \Drupal::currentUser()
      ->id());
  }
}