You are here

function _linkchecker_link_access in Link checker 7

Same name and namespace in other branches
  1. 6.2 linkchecker.module \_linkchecker_link_access()

Determines if the current user has access to view a link.

Link URLs can contain private information (for example, usernames and passwords). So this module should only display links to a user if the link already appears in at least one place on the site where the user would otherwise have access to see it.

Parameters

object $link: An object representing the link to check.

Return value

array

4 calls to _linkchecker_link_access()
linkchecker_form_alter in ./linkchecker.module
Implements hook_form_alter().
linkchecker_form_comment_form_alter in ./linkchecker.module
Implements hook_form_BASE_FORM_ID_alter().
linkchecker_node_prepare in ./linkchecker.module
Implements hook_node_prepare().
_linkchecker_user_access_edit_link_settings in ./linkchecker.module
Access callback for linkchecker/%linkchecker_link/edit.

File

./linkchecker.module, line 234
This module periodically check links in given node types, blocks etc.

Code

function _linkchecker_link_access($link) {
  $link = (object) $link;
  return _linkchecker_link_node_ids($link) || _linkchecker_link_comment_ids($link) || _linkchecker_link_block_ids($link);
}