Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Any plans?
Comment | File | Size | Author |
---|---|---|---|
#42 | 1047132-session_limit-d7.patch | 18.26 KB | snufkin |
#39 | 1047132-39-Drupal-7-port.patch | 53.81 KB | jweowu |
#35 | 1047132-session_limit-d7.patch | 15.89 KB | snufkin |
#34 | 1047132-session_limit-d7.patch | 5.74 KB | snufkin |
#33 | 1047132-session_limit-d7.patch | 4.73 KB | snufkin |
Comments
Comment #1
deekayen CreditAttribution: deekayen commentedYes. It will be upgraded.
Comment #2
ervindm CreditAttribution: ervindm commentedHi Deekayen,
I was able to modify the current 6.x-2.1 Session Limit code to be able to run it on Drupal 7.
How can I contribute or send you my code?
What have been done?
I modified several queries (to d7_dbtng), db_fetch (to foreach), and _trigger_get_hook_aids (changed to trigger_get_assigned_actions), and i modified the hook_menu to use admin/config/people/session_limit pathing.
Thanks and regards,
Ervin
Comment #3
ervindm CreditAttribution: ervindm commentedI already have working session_limit drupal 7 module base on current session_limit for d6
Comment #4
ervindm CreditAttribution: ervindm commentedI changed the checkbox on Session Limit Configuration screen to Radio Buttons. I rename the field as Behavior.
On Radio buttons there are three options, these are:
-Prompt user on which session to drop.
-Automatically drop the oldest sessions without prompting.
-Block newer users without prompting.
The 3rd option is a new feature to automatically block newer sessions for user that reached the max sessions. The session will continuously block user until the session expires and the session count falls below the max session count.
Comment #5
ervindm CreditAttribution: ervindm commentedI also added a setting to modify the messages thrown when disconnected or blocked
Comment #6
giorgio79 CreditAttribution: giorgio79 commentedSounds good ervindm, care to post the patch here so we can review it?
Comment #7
Leeteq CreditAttribution: Leeteq commented@ervindm; have you noticed the possibility to upload zip files etc. right below the comment area here?
Comment #8
bmeso CreditAttribution: bmeso commentedhi
drop new session automatic have any help?
Comment #9
movinr8along CreditAttribution: movinr8along commentedWould love to try out what you've got there ervindm.
Comment #10
RikiB CreditAttribution: RikiB commentedI am very much looking forward to a drupal 7 version. Thanks for the hard work!
Comment #11
leguy CreditAttribution: leguy commentedsubscribed
Comment #12
marcusx CreditAttribution: marcusx commentedsubscribing
Comment #13
FeBus982 CreditAttribution: FeBus982 commentedsubscribed
Comment #14
ervindm CreditAttribution: ervindm commentedhere is my D7 version of this module.
Sorry for my late reply. I was busy with my current projects.
Thanks!
Comment #15
ervindm CreditAttribution: ervindm commentedOn current version, Administrators are not constrained with limiting of sessions.
and on user/$user_id there will be disconnect button to have functionality to disconnect currently logged in user.
Comment #16
bmeso CreditAttribution: bmeso commentedHi ervindm
i am try with my d7 can,t work hear
Comment #17
ervindm CreditAttribution: ervindm commentedwhy is it not working? can you give me the error log or screenshot? Thanks!
Comment #18
bmeso CreditAttribution: bmeso commentedHI ervindm
check your mail
Comment #19
ervindm CreditAttribution: ervindm commentedHi bmeso,
I saw your screenshots but i dont see any error when you installed it.
What do you want to do with it? Maybe your expectation is different on what this module can do.
You can read the original readme file regarding session limit and read my comments here of what has just been added.
Thanks!
Comment #20
deekayen CreditAttribution: deekayen commentedIt helps me to know to review something if you change the status. As it is, without having tested it, #14 doesn't comply with the Drupal coding standards.
Any chance you could run Coder against it and send an update?
Comment #21
ervindm CreditAttribution: ervindm commentedI will let you know if I am done with it. Thanks!
Comment #22
Josh Waihi CreditAttribution: Josh Waihi commentedHere is a patch based on the git master branch. I unziped the zip from #14 over it first, then went about cleaning up the coding standards and improving a number of things. I've done a few hours testing focusing on the main admin functionality. I haven't really looked at or tested the user settings tab stuff.
I've separated out the page functions to session_limit.pages.inc to lighten up the .module file. I've also taken out logic regarding caching of the front page and redirecting there as I didn't see the point to it.
Comment #23
bmeso CreditAttribution: bmeso commentedHi Josh
can you send hear full working copy
Comment #24
Josh Waihi CreditAttribution: Josh Waihi commentedSure thing. Git repo attached also.
Comment #25
bmeso CreditAttribution: bmeso commentedhi error with this
Error message
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxxxx_1.session_limit_user_limits' doesn't exist: SELECT threshold FROM {session_limit_user_limits} WHERE uid = :uid; Array ( [:uid] => 2 ) in session_limit_get_user_limit() (line 348 of /home/xxxxx/public_html/drupal-7.0/modules/session_limit/session_limit/session_limit.module).
Comment #26
Josh Waihi CreditAttribution: Josh Waihi commenteddid you install the module or just try use it on an already installed version? That table should be installed when the module installs.
Comment #27
ervindm CreditAttribution: ervindm commentedHi bmeso,
follow these steps:
If you have current Session Limit Installed follow the following steps:
UPGRADING: (Minor revision change for Drupal 7.x only)
1.) uninstall the current Session Limit version you have on your drupal
2.) over-write session_limit directory with the new version
3.) refresh Cache on you drupal
4.) install session_limit
Else,
INSTALLATION:
1.) extract session limit on your sites/all directory (then you will create sites/all/session_limit directory)
2.) go to Modules, and Install the Session Limit module
Comment #28
Zen CreditAttribution: Zen commentedI've attempted to review the provided patch. Here are my notes thus far from a cursory look:
... and so on and so forth. Please provide a minimal patch that upgrades the module and does nothing else. New features and other changes can be tackled later on.
-K
Comment #29
adam_b CreditAttribution: adam_b commentedsubscribe
Comment #30
bennos CreditAttribution: bennos commentedsubscribe
Comment #31
Josh Waihi CreditAttribution: Josh Waihi commentedIts all there in the Git repo. You're welcome to dissect it all you need. Git++
Comment #32
snufkin CreditAttribution: snufkin commentedFixed queries.
Fixed PHP errors.
Fixed trigger API function change.
Removed a drupal_goto as it was sending the site around and seemed unnecessary.
Tested with a session limit of 1 for a single user.
I am sure there is still quite some work to do on features I haven't tested, but now it installs at least without errors.
Comment #33
snufkin CreditAttribution: snufkin commentedRerolled the patch with the drupal_goto and removed the drupal_set_message.
Comment #34
snufkin CreditAttribution: snufkin commentedFixing the byrole form as well while im at it :)
Comment #35
snufkin CreditAttribution: snufkin commentedMore fixes, working tokens, fixed the user form and the per-user session limit (this is broken still in drupal 6 because user_save expects the 'data' key in the array). Actions are also fired now correctly. Masquerade is correctly supported.
Comment #36
tancHi snufkin, which version of the module do I apply your patches against? I tried Josh's module in #24 and applied your patches against it. Only patch in #32 applied cleanly. Patch in #35 had 5 out of 17 hunk fails.
deekayen, can you make a D7 branch so people can offer patches against that?
Comment #37
snufkin CreditAttribution: snufkin commentedIts against the master branch.
Comment #38
ntigh52 CreditAttribution: ntigh52 commentedHi to all,
Is there an updated version to drupal 7?
I installed #14 and nothing happens,
Please help me to understand wich # is correct..
Thanks in advance.
Comment #39
jweowu CreditAttribution: jweowu commentedThis is a bug-fix replacement for Josh's version of the module from #22, to resolve an error with session_limit_user_role_delete(). (This is NOT relevant to snufkin's work.)
Comment #40
jweowu CreditAttribution: jweowu commentedntigh52: it looks like you have two options, the most recent versions of which are at #35 and #39. Both are patches to apply against the master branch. I think snufkin's version is intended as a straight port of the D6 version. The other version has some additional changes (as you'll see in the patch) which may or may not end up in an official D7 release.
Comment #41
Zen CreditAttribution: Zen commented@snufkin: Your last patch alludes to a .tokens.inc. But there is no such file created by your patch.
Please advise.
-K
Comment #42
snufkin CreditAttribution: snufkin commentedUpdated patch now with more .tokens.inc files!
Comment #43
deekayen CreditAttribution: deekayen commentedThis has gone long enough. I committed #42 and will make the first beta from that.
Comment #44
ntigh52 CreditAttribution: ntigh52 commentedHi,
I installed the modul and the module work in drupal 7.
with Attention about the bugs:
1. see http://drupal.org/node/1384652 .
2. when I add a new role and create new user with that role the default session limit is 1.
why?
explain:
i have role admin, role 1, role 2, role 3.
admin session limit = default. ( work perfect )
role1 session limit = 1. ( work perfect )
role2 session limit = default. ( not working well because I can access just 1 time ), but if I choose session limit = 50 ( for example ), its work.
It is important to note: when I create new role and add user to this role I get the same error:
Thanks/
Comment #45
snufkin CreditAttribution: snufkin commentedPlease don't use this issue queue for further issues with the 7.x branch but open new ones instead. I posted a patch to your notice bugreport here: #1384652: Undefined replacements variable throws notice.