You are here

public static function UcAddressesPermissions::canViewAllDefaults in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 class/UcAddressesPermissions.class.php \UcAddressesPermissions::canViewAllDefaults()

If the account may view all default addresses.

@access public @static

Parameters

object $account: (optional) The account to check access for. Defaults to the current active user.

Return value

boolean TRUE if the account may view all default addresses. FALSE otherwise.

2 calls to UcAddressesPermissions::canViewAllDefaults()
UcAddressesPermissions::canViewAddress in class/UcAddressesPermissions.class.php
Check if user may view this address.
UcAddressesPermissions::canViewOwnDefault in class/UcAddressesPermissions.class.php
If the account may view its own default addresses.

File

class/UcAddressesPermissions.class.php, line 292
Permission class.

Class

UcAddressesPermissions
The permission class: UcAddressesPermissions.

Code

public static function canViewAllDefaults($account = NULL) {
  $account = self::getAccount($account);
  return user_access(self::VIEW_ALL_DEFAULTS, $account) || self::canViewAll($account);
}