Came across this in http://drupal.org/node/348731 and thought of all the useful ways this can be used.

Sending reminders to users that haven't logged in for x days.
Unpublishing content after user has not logged in for x days.
Deactivate accounts after user has not logged in for x days.

Would this be best as a condition that sets the scheduler?

It would be awesome if someone can look into expanding the power of Rules with this addition.

Thanks very much in advance

Comments

fago’s picture

Category: feature » support
Status: Active » Fixed

This can be already done:

Use scheduling, once the node is created configure a rule set to be scheduled 30days later. Then 30days later the rule set can unpublish the job. Have a look at the tutorials to get into scheduling.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

guntherdevisch’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Component: Features integration » Rules Engine
Status: Closed (fixed) » Active

Hi,

I'm very interessted in this feature, especially "Sending reminders to users that haven't logged in for x days".
I want to send a reminder mail if a user hasn't logged in for x days, with a link to update a user profile field.

Is this possible?

I allready looked at http://drupal.org/node/348731, but didn't find a solution there.

Thanks,
Gunther

vkareh’s picture

Component: Rules Engine » Scheduler
Status: Active » Closed (fixed)

The functionality you are requesting can be done easily with the Inactive User module.

Using rules for more advanced functionality would involve something similar to the following:

  1. Create a new Rule Set that passes the User and (possibly) a Date argument
  2. Add a Check a truth value condition that verifies something like [user:user-last-login-raw] + 2592000 < [user:date-in-tz] (2592000 is 30 days in seconds)
  3. Add a Send a mail to a user action

Save that rule set and then do the following:

  1. Create a new triggered rule for User has logged out event
  2. Add a Schedule "your rule set" action and pass +30 days as the Scheduled evaluation date

Disclaimer: I have no idea if this actually works, as I haven't tested it, but it should give you a good base from where to start.

#348731: Condition: date/time comparison Deals with date comparison but it's not part of Rules yet (at least until we port the patch for D7.x and then backport), so use with caution.

guntherdevisch’s picture

Component: Scheduler » Rules Engine

Hi vkareh,

The Inactive User module looks nice, but i saw that it isn't role based. I needed something role based, so i tried your definied rule above and added an extra role condition. And i must say: It works great! You nailed it :)

Thanks for your time & help,

Cheers,
Gunther

JamFar’s picture

Version: 6.x-1.4 » 7.x-1.0-alpha2
Status: Closed (fixed) » Active

Like this thread very much.

...subscribing

vkareh’s picture

Version: 7.x-1.0-alpha2 » 6.x-1.4
Status: Active » Closed (fixed)

This issue was already closed. Reverting.