function regcode_voucher_user_update in Registration codes 7
Same name and namespace in other branches
- 7.2 regcode_voucher/regcode_voucher.module \regcode_voucher_user_update()
Implements hook_user_update().
File
- regcode_voucher/
regcode_voucher.module, line 71 - Main code and hooks for regcode voucher module.
Code
function regcode_voucher_user_update(&$edit, $account, $category) {
if (empty($edit['regcode_code'])) {
return;
}
$code = regcode_code_consume($edit['regcode_code'], $account->uid);
if (is_object($code)) {
drupal_set_message(check_plain(variable_get('regcode_voucher_message', 'Voucher code used successfully.')));
}
}