Hello, I've been quite happy with this module and here is something that would make it even better:

Would it be possible to allow configuring the number of permitted sessions by user or role? Currently if session limit is enabled, it enforces a limit of one session per user only.

Thank you very much for the work you've put into this module.

Comments

greg.harvey’s picture

Version: 6.x-2.2 » 6.x-2.x-dev
Assigned: Unassigned » greg.harvey

We actually want to do this and have budget to write the patch. Will start ASAP.

greg.harvey’s picture

Please find two patches attached - one against 6.x-2.x-dev and one against 6.x-2.2 in case someone needs to use it now. This has been implemented in the form of a sub-module and the patch adds it to the package. This felt like the most sensible way to go, and makes the new behaviour an installation option (e.g. if you don't want it, you don't need the tables in your database).

Patch actually written by Pascal Morin: http://drupal.org/user/320744

greg.harvey’s picture

StatusFileSize
new3.59 KB

Sorry, my mistake. Patch does *not* add the module to package yet. The module is attached too. The patch just adds the necessary code to the core module to make it work (nicely wrapped in module_exists() checks so as to be harmless if the additional module is not installed). Additional module also required to use. Attached to this post.

greg.harvey’s picture

Assigned: greg.harvey » Unassigned
Status: Needs review » Needs work

Is this module being actively maintained? This issue's been set to "needs review" for a while now, no comment from maintainers?

Also, reminding myself to provide a proper patch!

jvandervort’s picture

Have you looked at: http://drupal.org/project/session_limit

It has been proposed that this feature be deprecated from autologout.
#708306: Deprecate session limit functionality

greg.harvey’s picture

Yes indeed. Some history: we were hired to make this functionality work on a tight budget. As a part of that we reviewed the various options. Early on we suggested the Session Limit module, but our customer said he had tried it and it did not support per-user limits. One of our developers tried it and agreed, it did not meet the use case our client needed. (If this has changed then he might review his position, but at the time that's where it was.) As such we weighed up patching Autologout against patching Session Limit, and patching your module was waaay the quicker win. We were able to do it for half the price and the code is here.

Unless Session Limit does this now, and I don't believe it does (but have not personally tested it) then until it does I think this patch for Autologout is valid. Since it will be the only way to achieve this feature. If someone, later, writes a similar patch for Session Limit then fair enough, but after our review we found the work involved to be significant.

So, long story short: your module was the quickest win, this sub-module works with a tiny patch to the main module and I see no reason not to include it unless Session Limit already does the exact same thing (which I don't believe it does).

Thoughts?

dandrews’s picture

Status: Needs work » Closed (works as designed)

This issue is well over a year old. There as been a fix posted and a secondary module that adds this functionality.