I'm using this module in my website. And I want to logout the user when he/she is inactive for 30 min. The feature is working fine. But the problem comes when the user is uploading large files. In this case the auto logout is triggering and logging out the user without completing the upload.
Can anyone help me to fix this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arijits.drush’s picture

Assigned: Unassigned » arijits.drush
arijits.drush’s picture

Here is a solution , which will work with

managed_file

basically checking for
if

ajax_progress

class exists and reset timer.

arijits.drush’s picture

Status: Active » Needs review
Roadking’s picture

I'm using this patch with AutoLogout 7.x-4.4, Drupal 7.55, PHP 5.3.3, MySQL 5.7.
Patch works but exhibits side effects. After a long running file upload occurs the user is logged out but not redirected to the declared destination in the config (front for us). They stay on the same page they were on when the file upload was occurring. This causes them to see the "Access Denied" screen as they are now an anonymous user. Not a big deal but would be cleaner if it could still take them to the configured log out destination.
Also, when using a file field on a node edit page you must use the browse button to designate the file for upload then click the node save button at the bottom of the page. Use of the "Upload" button next to the file field will result in the node not being saved after the timeout occurs. This means you can't take advantage of the upload progress bar. The file still uploads but never clears /tmp and is set as status 0 in file_managed.
I appreciate the patch as it allows us to keep our mandated low inactivity timeout level but would be nice if there was a cleaner way to implement it. Thanks!

DamienMcKenna’s picture

Assigned: arijits.drush » Unassigned

Thanks for the patch.

FYI you should leave the "assigned" field set to "unassigned" after you upload a patch - it's for indicating that you're actively working on the issue, not for indicating that you are a person who worked on it.

Roadking’s picture

Has this issue/patch ever been rolled into a new version? It does not appear to be in the latest version 4.6 and is still needed for allowing users to upload large files without being logged out until the process is complete. Thank you.