Hi,
I searched the issue queue but I haven't found anything which really helped me...
I want to provide my users a specific “user settings” page which I realized by creating a new content type “usersettings” and categorized this content type as a “content profile” via the content profile module.
Like this for every user exact one node of the “user settings” type can be created. I create this via rules after user creation.
I added several checkboxes to this content type to give the user the possibility to control some settings (E.g. “Email me if I receive a new Private Message”, “Email me if I have a new friend request”, etc.)
I was able to create the above rules successfully (Email on privatemsg, email on friendrequest) based on the rules provided by the modules.
What I want to achieve now, is to take the “user settings” as a condition for the above rules like this:
- Event: User gets privatemsg
- Condition: User checked cck field “send me an email on new privatemsg) = true
- Action: Send user an email
Is there a possibility to read out the value of a cck field of a node of a specific content type of a specific user which is given in the event and use this value as a condition.
Thank you for your suggestions….
Regards,
Ben
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | usersettings_rule.txt | 3.38 KB | bensemmel |
Comments
Comment #1
fagoYep, it's already possible by using the "load content profile" action. Then you have the data accessible and you can check it by using usual conditions.
Comment #2
bensemmel commentedHi Fago,
thank you for helping out, but unfortunately I don't get it done.
I added as described the "load content profile" action and choose my "user settings" content type. If I understand you correctly, the conditions for node types like "field has value" should be available then while adding conditions.
Unfortunately they aren't...
What do I miss? To understand better my current rules settings I added the exported rule.
Thank you
Regards
Ben
Comment #3
mitchell commentedPlease test with the latest versions of both modules and report back.
Comment #4
bensemmel commentedFinally coming back to this:
Unfortunately it still doesn't work as well with the latest versions...
I load the content profile type successfully due to the log, but cannot access the values...
I think the problem ist that the workflow i like that:
1. Trigger: Send a message
2. Condition: Check truth value, if user wants email about message
3. Action 1: Load user profile
4. Action 2: Send Email
The order should be
1. Trigger: Send a message
2. Action 1: Load user profile
3. Condition: Check truth value, if user wants email about message
4. Action 2: Send Email
Can sb give me a hint how to achieve this? Unfortunately I don't understand too much about the rule sets concept, so I'm not sure if using them might help...
Thank you...
Ben
Comment #5
crizHi bensemmel,
you could use a ruleset for this I think. Load the user profile in the rule and pass the variable to a ruleset where you check the condition and send the email if true.
cheers,
criz
Comment #6
bensemmel commentedHi criz,
thank you for the hint. I dived a little bit deeper into rule sets and after understanding the logic behind the arguments, I achieved what I wanted to do by following your suggestion...
Thank you very much.
Regards,
bensemmel