You are here

public static function UcAddressesPermissions::canEditOwn in Ubercart Addresses 7

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

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

2 calls to UcAddressesPermissions::canEditOwn()
UcAddressesPermissions::canEditAddress in class/UcAddressesPermissions.class.php
Check if the user can edit addresses of this user.
UcAddressesPermissions::canViewOwn in class/UcAddressesPermissions.class.php
If the account may view its own addresses.

File

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

Class

UcAddressesPermissions
The permission class: UcAddressesPermissions.

Code

public static function canEditOwn($account = NULL) {
  $account = self::getAccount($account);
  return user_access(self::EDIT_OWN, $account) || self::canEditAll($account);
}