Download & Extend

User profile field values as conditions

Project:Workflow-ng
Version:5.x-2.1
Component:Wng Module Integration
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello,
Thanks for the excellent module.
Perhaps I am missing something but I can't achieve the following functionality.
I want to have the following configuration:
When a new comment is created, send an email notification to the node author.
If (and only if) the node author has checked the "Receive comment notifications" checkbox at his user profile.
It seems I can't associate conditions with profile fields (of the core profile module).
I have searched all the conditions but no success.
Is it possible to achieve this functionality?
Thanks in advance.

Comments

#1

Any news?

#2

yep, that would be nice to have.

>Is it possible to achieve this functionality?
yes.

However, I don't use the core profile module any more, so I won't work on that. Of course, contributions are welcome.

#3

Have you tried something like this?

Create a field 'profile_notification' with profile module (type: checkbox).

Create your Workflow-NG Rule with action.

Create a condition 'Execute custom PHP code".
Use this:

$uid = [author:uid];
$account = user_load(array('uid' => $uid));
return $account->profile_notification == '1';

This works for me. Maybe you have to tweak it a little bit to match your needs.

cheers, Ronald