You are here

public static function UcAddressesPermissions::canViewOwnDefault in Ubercart Addresses 7

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

If the account may view its own 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 its own default addresses. FALSE otherwise.

1 call to UcAddressesPermissions::canViewOwnDefault()
UcAddressesPermissions::canViewAddress in class/UcAddressesPermissions.class.php
Check if user may view this address.

File

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

Class

UcAddressesPermissions
The permission class: UcAddressesPermissions.

Code

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