You are here

function uc_roles_condition_role in Ubercart 6.2

Checks the role being granted.

Parameters

$order: The order as passed by uc_roles_notify_*

$expiration: The role and expiration data as passed by uc_roles_notify_*

$settings: Settings as generated by uc_condition_role_form().

See also

uc_roles_condition_role_form()

1 string reference to 'uc_roles_condition_role'
uc_roles_ca_condition in uc_roles/uc_roles.ca.inc
Implements hook_ca_condition().

File

uc_roles/uc_roles.ca.inc, line 500
This file contains the Conditional Actions hooks and functions necessary to make the roles-related entity, conditions, events, and actions work.

Code

function uc_roles_condition_role($order, $expiration, $settings) {
  $roles = array_filter($settings['roles']);
  return isset($roles[$expiration->rid]);
}