

If you want to execute your code only for one specific view, get the current view path into $token variable and compare it with your view path as given in the following code. If you want to execute your code only once, then use the condition $current=2 inside foreach loop. In the foreach loop provided in the function, add your custom code. In views_bulk_operations_execute() function, add the code that you want to execute 'before' executing the rules component. But I can see that it's just getting a single line of data (space separated email addresses).ĭoes anyone know how I can pass line breaks within a variable value? I have imploded the array of email addresses with "\r\n", but that seems to just get stripped away.As I didn't find any other solution, I hacked the views_bulk_operations.module to accomplish my work. This is defined as requiring A list of values, one on each line which is what should be coming in from the previous define variable. Next, I have a new variable being defined by Add a variable, type List of text with the value being the valid_emails. This is assigned to variable valid_emails. output text (one per line) of the emails.

I verify the formats of the email addresses and create an array of the valid ones. So I get the node:author:uid, load the user and grab the value from the field_also_notify. In the rule actions I have a variable being defined by Add a variable, type Text with the value being a PHP processed output since that field is not directly accessible by this Rule with available patterns. Seemes cut and dry, but I can't seem to get the following working These are assistants to the users (in real life). Its purpose is to allow me to add one email address per line for people that should also be notified, in addition to the author. I've recently added a long text field on users called Also notify. I have a Rule that fires when the moderation state of a node changes (via Workbench) by anyone other than the author, the author of the node is notified via email (action is Send email).

If you wish to post something of that nature we suggest you check out 's paid services job board Our Friends

In Business Rules click on the Variables tab and add a new Variable View Results Variable and under View to execute. In my case I created a block view of this and I put a filter in this view to only display users of a certain role. Would you or someone you know make for an interesting Drupal AMA? Message the mods. In Views create a view of users and add the email field to the view. When would you like to start? Let us know!.Mike Gifford (Accessibility Core Maintainer Drupal 8) – Click Here.The place for news, articles and discussion regarding one of the top open source (GPL) CMS platforms: Drupal. Check out the sidebar for our AMA schedule, or view our past AMA's.
