You are here

function logintoboggan_site_403_validate in LoginToboggan 6

Same name and namespace in other branches
  1. 5 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.

1 string reference to 'logintoboggan_site_403_validate'
logintoboggan_form_alter in ./logintoboggan.module
Implementation of hook_form_alter()

File

./logintoboggan.module, line 1210
Logintoboggan Module

Code

function logintoboggan_site_403_validate($form, &$form_state) {

  // 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_state['values']['disabled_modules']['logintoboggan']) && !$form_state['values']['status']['logintoboggan'] && variable_get('site_403', '') == 'toboggan/denied') {
    variable_set('site_403', '');
  }
}