private static function UcAddressesPermissions::getAccount in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 class/UcAddressesPermissions.class.php \UcAddressesPermissions::getAccount()
Helper function for getting the account to check access for.
@access private @static
Parameters
object $account: (optional) The account return. Defaults to the current active user.
Return value
object The account to check access for.
12 calls to UcAddressesPermissions::getAccount()
- UcAddressesPermissions::canDeleteAddress in class/
UcAddressesPermissions.class.php - Check if the user can delete addresses of this user. Default addresses can never be deleted.
- UcAddressesPermissions::canDeleteAll in class/
UcAddressesPermissions.class.php - If the account may delete all addresses.
- UcAddressesPermissions::canDeleteOwn in class/
UcAddressesPermissions.class.php - If the account may delete its own addresses.
- UcAddressesPermissions::canEditAddress in class/
UcAddressesPermissions.class.php - Check if the user can edit addresses of this user.
- UcAddressesPermissions::canEditAll in class/
UcAddressesPermissions.class.php - If the account may edit all addresses.
File
- class/
UcAddressesPermissions.class.php, line 414 - Permission class.
Class
- UcAddressesPermissions
- The permission class: UcAddressesPermissions.
Code
private static function getAccount($account = NULL) {
if (!$account) {
global $user;
return $user;
}
return $account;
}