function uc_roles_nodeapi in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_roles/uc_roles.module \uc_roles_nodeapi()
Implementation of hook_nodeapi().
File
- uc_roles/
uc_roles.module, line 113 - Grants roles upon accepted payment of products
Code
function uc_roles_nodeapi(&$node, $op, $arg3 = null, $arg4 = NULL) {
switch ($op) {
case 'delete':
if (in_array($node->type, module_invoke_all('product_types'))) {
db_query("DELETE FROM {uc_roles_products} WHERE nid = %d", $node->nid);
}
break;
default:
break;
}
}