Hi,

Thank you for your wonderful module!

I have set up a rule to send users of a certain role a message (announcement) of a new feature on the website.

As follows:

Event: User has logged in
Element: User has role
Do: Send a message

the above works fabulously, but the problem is .. it sends the message every time the person logs in.

Please how do I have the message sent only once (one-time) ? and no repeats?

Look most forward to any reply :)
Lilian

Comments

mitchell’s picture

Status: Active » Fixed

You could create a role 'messaged.' Then, you could add an action to your rule to add the user to that role, and you can add a condition to check if the user is a member of that role before sending them the message.

liliplanet’s picture

Thank you for your suggestion opensanta, but creating another role is not a good idea for over 14 000 members .. most appreciate your reply :)

mitchell’s picture

Status: Fixed » Active

Hmm. I have another idea, and this actually seems much better, but I can't make any promises about performance. You could use a profile for each user. This is a common practice for me ever since I played around with content_profile. Instead of installing that module, I add a content type called profile for users to fill out information about themselves, but it would also work well for storing tracking data about them as well. In your case, you could add a field to the profile specific to that message, and once you send it, change the value in it.

itangalo’s picture

Yeah, some kind of extra data along with every user account will be necessary to get this working – otherwise Drupal and Rules won't have a chance of knowing if a message should be shown or not. Since this is a simple 1/0 thing, you could consider using Flag. Or, as opensanta suggests, add some information in profile.

mitchell’s picture

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

Ah, old memories.