function rabbit_hole_form_validate in Rabbit Hole 7.2
Validation callback for the Rabbit Hole form.
1 string reference to 'rabbit_hole_form_validate'
- rabbit_hole_form in ./
rabbit_hole.module - Form structure for the Rabbit Hole configuration.
File
- ./
rabbit_hole.module, line 274 - Main module file for Rabbit Hole.
Code
function rabbit_hole_form_validate($form, &$form_state) {
// If there is PHP in the redirect path, make sure that the user has the
// permission to evaluate PHP.
if (rabbit_hole_contains_php($form_state['values'][$form_state['values']['redirect_setting_name']]) && !rabbit_hole_access_php($form_state['values']['rh_module'])) {
form_set_error($form_state['values']['redirect_setting_name'], t("You don't have permission to evaluate PHP in the redirect path."));
}
}