function _site_disclaimer_validate_checkbox in Site Disclaimer 7
Same name and namespace in other branches
- 6 site_disclaimer.module \_site_disclaimer_validate_checkbox()
Validation callback; verify that checkbox is checked.
1 string reference to '_site_disclaimer_validate_checkbox'
- site_disclaimer_form_user_register_form_alter in ./
site_disclaimer.module - Implements hook_form_form_id_alter().
File
- ./
site_disclaimer.module, line 440 - This module adds Site Disclaimer to the registration page.
Code
function _site_disclaimer_validate_checkbox($form, &$form_state) {
$value = $form_state['values']['I_agree'];
if ($value != variable_get('site_disclaimer_version', 1)) {
form_set_error('I_agree', t('You must agree with the !terms to get an account.', array(
'!terms' => check_plain(variable_get('site_disclaimer_title', SITE_DISCLAIMER_DEFAULT_TITLE)),
)));
}
}