diff --git a/www/sites/all/modules/contrib/autologout/autologout.admin.inc b/www/sites/all/modules/contrib/autologout/autologout.admin.inc index 0b7939305..621b46dd8 100644 --- a/www/sites/all/modules/contrib/autologout/autologout.admin.inc +++ b/www/sites/all/modules/contrib/autologout/autologout.admin.inc @@ -66,6 +66,13 @@ function autologout_settings() { '#description' => t('Send users to this internal page when they are logged out.'), ); + $form['autologout_no_destination'] = array ( + '#type' => 'checkbox', + '#title' => t('Do not preserve destination.'), + '#default_value' => variable_get('autologout_no_destination', FALSE), + '#description' => t('Enable this if you do not want users to return to the page they were previously on before being logged out.') + ); + $form['autologout_no_dialog'] = array( '#type' => 'checkbox', '#title' => t('Do not display the logout dialog'), @@ -78,7 +85,7 @@ function autologout_settings() { '#title' => t('Use alternate logout method'), '#default_value' => variable_get('autologout_use_alt_logout_method', FALSE), '#description' => t('Normally when auto logout is triggered, it is done via an AJAX service call. Sites that use an SSO provider, such as CAS, are likely to see this request fail with the error "Origin is not allowed by Access-Control-Allow-Origin". The alternate approach is to have the auto logout trigger a page redirect to initiate the logout process instead.'), - ); + ); $form['autologout_message'] = array( '#type' => 'textarea', diff --git a/www/sites/all/modules/contrib/autologout/autologout.install b/www/sites/all/modules/contrib/autologout/autologout.install index e79ce76cd..118e3a983 100644 --- a/www/sites/all/modules/contrib/autologout/autologout.install +++ b/www/sites/all/modules/contrib/autologout/autologout.install @@ -12,6 +12,7 @@ function autologout_uninstall() { variable_del('autologout_timeout'); variable_del('autologout_use_watchdog'); variable_del('autologout_redirect_url'); + variable_del('autologout_no_destination'); variable_del('autologout_message'); variable_del('autologout_inactivity_message'); variable_del('autologout_padding'); diff --git a/www/sites/all/modules/contrib/autologout/autologout.module b/www/sites/all/modules/contrib/autologout/autologout.module index 065c67cd2..f573d0864 100644 --- a/www/sites/all/modules/contrib/autologout/autologout.module +++ b/www/sites/all/modules/contrib/autologout/autologout.module @@ -374,7 +374,7 @@ function autologout_init() { $timeout = _autologout_get_user_timeout(); $timeout_padding = variable_get('autologout_padding', 10); $redirect_url = variable_get('autologout_redirect_url', 'user/login'); - $redirect_query = drupal_get_destination() + array('autologout_timeout' => 1); + $redirect_query = variable_get('autologout_no_destination') ? NULL : drupal_get_destination() + array('autologout_timeout' => 1); $no_dialog = variable_get('autologout_no_dialog', FALSE); $use_alt_logout_method = variable_get('autologout_use_alt_logout_method', FALSE); drupal_add_library('system', 'ui.dialog');