You are here

function hook_webform_submission_access in Webform 6.3

Same name and namespace in other branches
  1. 8.5 webform.api.php \hook_webform_submission_access()
  2. 7.4 webform.api.php \hook_webform_submission_access()
  3. 7.3 webform.api.php \hook_webform_submission_access()
  4. 6.x webform.api.php \hook_webform_submission_access()

Alter access to a Webform submission.

Parameters

$node: The Webform node on which this submission was made.

$submission: The Webform submission.

$op: The operation to be performed on the submission. Possible values are:

  • "view"
  • "edit"
  • "delete"
  • "list"

$account: A user account object.

Return value

TRUE if the current user has access to submission, or FALSE otherwise.

Related topics

1 invocation of hook_webform_submission_access()
webform_submission_access in ./webform.module

File

./webform.api.php, line 475
Sample hooks demonstrating usage in Webform.

Code

function hook_webform_submission_access($node, $submission, $op = 'view', $account = NULL) {
  switch ($op) {
    case 'view':
      return TRUE;
      break;
    case 'edit':
      return FALSE;
      break;
    case 'delete':
      return TRUE;
      break;
    case 'list':
      return TRUE;
      break;
  }
}