Closed (fixed)
Project:
Protected Node
Version:
6.x-1.7
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Mar 2012 at 21:24 UTC
Updated:
13 Jan 2017 at 01:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
AlexisWilke commentedThe Rules extension offers a "node lock" action that allows you to clear the $_SESSION used with a given page.
There is no such automatism by default. You could also reduce the amount of time the password is live for to a small amount (i.e. 5 minutes) which would most certainly work the same way unless the user hits reload every few minutes.
Thank you.
Alexis Wilke
Comment #2
AlexisWilke commentedFixed title to be more talkative.
Comment #3
cathyhutzler commentedI need a solution to this as well. I have installed rules module and Protected Node rules extension. After searching on drupal.org and the internet I am not sure what to do next. Using drupal 6.25 If it is not too much trouble. Can you provide detailed information on how to add a node lock or inform me how to reduce the time the password is live. Your help is much appreciated.
Comment #4
AlexisWilke commentedI'm sorry... actually there isn't a way to setup the time to live of a protected node session. I guess that would be a neat addition. (in regard to my 5min. comment in #1)
Anyway, I added documentation about the Protected Node Rules and included a paragraph to give an example for how to do this. Unfortunately, you cannot use Rules with CRON to cancel a user session...
Let me know whether that works for you.
Thank you.
Alexis Wilke
Comment #5
cathyhutzler commentedThank you for the quick response. I was able to set this up and get this working on my site.
Comment #6
AlexisWilke commentedOkay, I guess I'll mark this as fixed then.
Thank you for the feedback.
Alexis
Comment #7
cathyhutzler commentedOk I thought I got this fixed, but when I tested it again today it does not work. Sigh
Here is what I did.
I created a thank you page and added a sticky to it.
On the page that is protected I added a log out button that links to this page.
I then created a rule
triggered rules/add a new rule/ created a name
and chose
Event: Content is going to be viewed
I checked: This rule is active and should be evaluated when the associated event occurs.
I then added a conditional that the page is sticky (this is so the event happens on logout and not after the password is entered on the protected page)
Next I added the action "lock the node away from the current user"
I have my page cache disabled.
Is there some thing I am missing?
Comment #8
AlexisWilke commentedYou're missing the loading of the node you want to lock. At this point you're "locking" the thank you page.
In the action you first need to "Load content by id" and use the id of the node you're leaving.
Thank you.
Alexis
Comment #9
cathyhutzler commentedThank you for your help. I really appreciate it. I know I must be over thinking it but I am also a newbie to using rules so thank you for hanging in here with me.
When you add the Load by content id do you just enter the node number in the Content ID field? I have tried just 1198, node/1198 and even the token [node:nid] and it is not working.
Again thank you for hanging in here with me. I would really like to get this to work and I feel I am super close.
Comment #10
AlexisWilke commentedOnce the node is loaded, and as far as I know you only want to enter the ID (1198 by itself), you need to edit the Lock action and select that node as the input for the action. Otherwise, it will still use the Thank you node...
Thank you.
Alexis
Comment #11
cathyhutzler commentedThank you. That is exactly what I was missing. I did not go back and edit the action for lock node from current user and select the node id I loaded.
Comment #12
jonwithhtop commentedI'm having this same issue. Is there anyway you could write detailed steps on how to do this with Drupal 7 and Rulex 2x
Comment #13
AlexisWilke commentedI updated the documentation for Drupal 6.x:
https://secure.m2osw.com/doc-protected-node-rules#logout
I do not deal with D7 at all!
Comment #14
tostinni commentedFor those looking for a simple solution in Drupal 7, here is some simple code to implement a link to disconnect a user.
In a custom module add those lines :
Then in a node template you can add :