You are here

public static function UcAddressesPermissions::canViewOwn in Ubercart Addresses 6.2

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

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

2 calls to UcAddressesPermissions::canViewOwn()
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 270
Permission class.

Class

UcAddressesPermissions
The permission class: UcAddressesPermissions.

Code

public static function canViewOwn($account = NULL) {
  $account = self::getAccount($account);
  return user_access(self::VIEW_OWN, $account) || self::canViewAll($account) || self::canEditOwn($account) || self::canDeleteOwn($account);
}