function logintoboggan_site_403_validate in LoginToboggan 5
Same name and namespace in other branches
- 6 logintoboggan.module \logintoboggan_site_403_validate()
Resets the the site 403 variable to the default if the module is disabled and the toboggan redirect on access denied is enabled.
File
- ./
logintoboggan.module, line 1062 - Logintoboggan Module
Code
function logintoboggan_site_403_validate($form_id, $form_values) {
// The check order is important:
// 1. Is the module disabled? Skip if so.
// 2. Has the module been selected to be disabled?
// 3. Is the current site 403 toboggan/denied?
// Only reset the site 403 variable if 2 and 3 are true.
if (!isset($form_values['disabled_modules']['logintoboggan']) && !$form_values['status']['logintoboggan'] && variable_get('site_403', '') == 'toboggan/denied') {
variable_set('site_403', '');
}
}