The permissions class: UcAddressesPermissions

Last updated on
9 May 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

This class checks for view, edit and delete access for a single address. So whenever you want to check permissions for address access, you should not call user_access(), but call the appropriate method in this class. Call canViewAddress() for view access, canEditAddress() for edit access and canDeleteAddress() for delete access. The class will then take care for calling user_access() itself.
If the permissions defined by Ubercart Addresses do not fit your needs, you are able to get further control about address access by implementing hook_uc_addresses_may_view(), hook_uc_addresses_may_edit() or hook_uc_addresses_may_delete(). See uc_addresses.api.php - included with the module - for more information.

Help improve this page

Page status: No known problems

You can: