You are here

function views_handler_field_contact_link::access in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 modules/contact/views_handler_field_contact_link.inc \views_handler_field_contact_link::access()
  2. 7.3 modules/contact/views_handler_field_contact_link.inc \views_handler_field_contact_link::access()

Check whether current user has access to this handler.

Return value

boolean

Overrides views_handler_field_user_link::access

File

modules/contact/views_handler_field_contact_link.inc, line 34

Class

views_handler_field_contact_link
A field that links to the user contact page, if access is permitted.

Code

function access() {
  global $user;

  // Only registered users can view other registered user's contact page.
  if (empty($user->uid)) {
    return FALSE;
  }
  return TRUE;
}