You are here

function uc_addresses_can_view_addresses in Ubercart Addresses 6

Checks if the current user may view addresses of user $address_user.

Parameters

object $address_user: Owner of the address

Return value

boolean

1 string reference to 'uc_addresses_can_view_addresses'
uc_addresses_menu in ./uc_addresses.module
Implementation of hook_menu().

File

./uc_addresses.module, line 278

Code

function uc_addresses_can_view_addresses($address_user) {
  global $user;
  $access = user_access(UC_ADDRESSES_ACCESS_VIEW_DEFAULT) || user_access(UC_ADDRESSES_ACCESS_VIEW_ALL) || user_access(UC_ADDRESSES_ACCESS_ADD_EDIT) || $user->uid == $address_user->uid;
  return $access;
}