Use Drupal sessions instead of a separate cookie
Richard Eriksson - March 20, 2008 - 21:19
| Project: | What Would Seth Godin Do? |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Richard Eriksson |
| Status: | active |
Description
I'd like to at least investigate the possibility of using Drupal's existing system for handling sessions instead of using a separate cookie to determine the number of times a person has visited the site initially.

#1
subscribing
#2
I don't think using sessions is going to work: if a visitor sees the block for the specified times, then logs in, that user again will see the block, as the session is different. I could put a check for user being logged in so that it doesn't display (if a person has signed up, they've already crossed enough of a hurdle that they're sticking around). As soon as the user logs out, the session is deleted, then the block shows up for the specified amount of times again. I've attached a patch to this for others to test.
Maybe there are other ways to do this that use the Drupal system instead of adding a cookie?
#3
not to mention modules like http://drupal.org/project/session_expire