You are here

function pay_user_settings_access in Pay 7

Same name and namespace in other branches
  1. 6 pay.module \pay_user_settings_access()

An access callback for access to user-specific Payment settings form.

1 string reference to 'pay_user_settings_access'
pay_menu_menu in includes/pay.menu.inc
Implementation of hook_menu().

File

./pay.module, line 125
Pay module allows for accepting payments using pluggable payment backends.

Code

function pay_user_settings_access($account) {

  // Permit access if any module returns TRUE in hook_pay_user_settings_access()
  foreach (module_implements('pay_user_settings_access') as $module) {
    $func = $module . '_pay_user_settings_access';
    if ($func($account)) {
      return TRUE;
    }
  }

  // Return FALSE by default, thus hiding the 'Payment settings' form.
  return FALSE;
}