You are here

function uc_addresses_views2_check_access in Ubercart Addresses 6.2

Access callback for views access plugin 'uc_addresses_views_access'.

Only used for Views 2, that always passes arguments literally.

Parameters

string $access_type: The operation to check:

  • view
  • edit
  • delete

int $uid: The position of the uid argument in the path.

int $aid: (optional) The position of the aid argument in the path.

Return value

boolean TRUE if the user should have access. FALSE otherwise.

1 string reference to 'uc_addresses_views2_check_access'
uc_addresses_views_access::get_access_callback in views/uc_addresses_views_access.inc
Implements views_plugin_access#get_access_callback().

File

./uc_addresses.module, line 967
Adds user profile address support to Ubercart.

Code

function uc_addresses_views2_check_access($access_type, $uid_arg, $aid_arg = NULL) {
  $uid = NULL;
  $aid = NULL;
  if ($uid_arg) {
    $uid = arg($uid_arg);
  }
  if ($aid_arg) {
    $aid = arg($aid_arg);
  }
  return uc_addresses_check_access_by_ids($access_type, $uid, $aid);
}