Download & Extend

prompting/popup when current session is about to expire

Project:Automated Logout
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Does this currently available in this version or 3.x-dev? If not mistaken,Session Limit module has this feature.

Comments

#1

It would be awesome if the user was given the option to continue their session in this prompt/popup without refreshing the page. Perhaps reset the timer using an AJAX call. That would be an excellent way to prevent data loss during form entry.

#2

It would be awesome if Automated Logout would prompt the user that their session is about to expire, and give the user the option of pressing OK/CANCEL to continue their session/logout - or simply automatically logout the user after the 2 minute prompted warning is shown. (Allowing the admin to set the length of time prior to the warning prompt and actual logout, as well as further customization of the prompt would be very cool too).

The functionality I described above is basically something you might have experienced when you use the website of your bank or credit card. I don't think Session Limit has this feature.

The admin page for Session Limit ( Site Configuration -> Session Limit ) only has two choices:

  • text field: maximum number of active sessions (default set to 1)
  • check box: automatically drop the oldest session without prompting (default set to unchecked)

I have yet to see the prompt warning the user that their session is about to expire. I've tested it with multiple browsers, with different user roles, with the automated logout module turned on and off with a timeout of 30 seconds, 60 seconds, etc. and nothing happens. Eventually I click on a link after a sufficient amount of time has passed over the time out and I get redirected to the login front page (if automated logout module is turned on).

#3

You don't get the prompt warning unless you use the automated logout info block in conjuction with the countdowntimer module.

Perhaps a break from the countdowntimer module is in order as that would give this module more control over the prompts, etc. I would be willing to help with the AJAX/javascript side of things if the maintainer is interested.

#4

Version:6.x-2.2» 6.x-2.x-dev
Category:support request» feature request

Moved to the current dev head.

#5

I made a pretty sweet little "popup" just using css, the countdown timer module, and the scripting already included in the module.

1) in autologout.module line 151: Add an extra set of span tags:
          <span style="display:none" class="format_txt"><span class="">You will be automatically logged out in %mins%:%secs%</span></span>

2) add some css so that the box is "display: none" until the moment when countdowntimer adds the extra span (the one that makes it red by default)

#block-autologout-0 {position:fixed; top:40px; left:200px; width:300px; z-index:20;}
#block-autologout-0 .content span span {display:none;}
#block-autologout-0 .content span span span {display: block; border:8px solid #ff4444; background:#ffffff; padding:10px; font-size:1.2em; z-index:20;}

Hope that's helpful to someone... the position:fixed doesn't seem to work in IE6 for me, but the box still appears where the block is placed on the page. You could put it in the header or sidebar and it should be a fine backup for IE6 users.
Works great in all the other a grade browsers.

Of course it would also be great to see a javascript solution that actually triggers a warning box at a certain time.

Is there a javascript call that would reset the timer? It would be nice to put a little "please keep me logged in" button below the warning that wouldn't refresh the page but would reset the timer...

#6

subscribe... I'd like this too

nobody click here