Is there a way to detect whether a form field is in focus or active so a user isn't logged out when writing content? I know that the session clock is reset on form submission, but this only helps with longer timeout periods. If you have a short timeout period, logging users out without somehow checking for active form fields makes it impossible for them to write content. Otherwise everything seems to work great! :)

Comments

magnus’s picture

Version: 6.x-2.5 » 6.x-2.x-dev

This would be really useful! Today I have to set the timer to 1 200 seconds (20 minutes), or the users will be pissed of when they input content to the site and suddenly gets logged out if the content takes some time to input.

If this gets inplemented, please make it work with WYSIWYG.

alan d.’s picture

Or alternatively, disable the meta-refresh on form pages. (Note that this should still log you out on form pages other than node forms, but at least you do not silently loss your work)

      $refresh = (int)_autologout_local_settings('refresh_delta');
      if ($refresh >= 0) {
        // Do not meta refresh on form pages.
        $is_form = FALSE;
        if ($router_item = menu_get_item()) {
          $is_form = $router_item['access'] && $router_item['page_callback'] == 'drupal_get_form';
        }
        if (!$is_form) {
          $force_refresh = $timeout + $refresh;
          $this_header = "<meta http-equiv=\"refresh\" content=\"{$force_refresh};\" />";
          drupal_set_html_head($this_header);
        }
      }
johnennew’s picture

Status: Active » Closed (won't fix)

Form usage detection is incorporated into the 4 version of this module. Closing old issue.