You are here

function hook_vud_access in Vote Up/Down 6.3

Same name and namespace in other branches
  1. 7.2 vud.api.php \hook_vud_access()
  2. 7 vud.api.php \hook_vud_access()

Allow modules to alter access to the voting operation.

Parameters

$perm: A string containing the permission required to modify the vote.

$content_type: A string containing the type of content being voted on.

$content_id: An integer containing the unique ID of the content being voted on.

$value: An integer containing the vote value, 1 for an up vote, -1 for a down vote.

$tag: A string containing the voting API tag. $param $account An object containing the user voting on the content, NULL for the current user.

Return value

A boolean forcing access to the vote, pass NULL if the function should not modify the access restriction.

1 invocation of hook_vud_access()
vud_access_callback in ./vud.module
Access callback for votes.

File

./vud.api.php, line 34
This file contains module hooks for users of Vote Up/down.

Code

function hook_vud_access($perm, $content_type, $content_id, $value, $tag, $account) {

  // Denies access for all users other than user 1.
  if ($account->uid != 1) {
    return FALSE;
  }
}