Community Documentation

Notify Users When Users Accounts Have Been Set to Active from Blocked / Pending

Last updated June 1, 2008. Created by dstrickland on June 1, 2008.
Log in to edit this page.

This is a simple example that shows the power of the workflow_ng module. I developed this workflow so that I could auto-notify users as I enabled the accounts. Before this, I found myself writing emails to each and every user that I enabled.

Very nice tool.

Hope this helps you in your Drupal journey,
David Strickland
www.Flextensity.net

array (
  'cfg_7' =>
  array (
    '#type' => 'configuration',
    '#label' => 'Account Turned Active',
    '#event' => 'user_update',
    '#weight' => '0',
    '#id' => 1,
    '#module' => 'workflow-ng',
    '#active' => 1,
    '#altered' => false,
    0 =>
    array (
      '#type' => 'condition',
      '#name' => 'workflow_ng_condition_custom_php',
      '#id' => 2,
      '#settings' =>
      array (
        'php' => 'return ($account_unchanged->status == 0) && ($account->status == 1);',
        'used_arguments' =>
        array (
        ),
        'used_php_arguments' =>
        array (
          0 => 'account',
          1 => 'account_unchanged',
        ),
      ),
    ),
    1 =>
    array (
      '#label' => 'Send a mail to an arbitrary mail address',
      '#id' => 3,
      '#name' => 'workflow_ng_action_mail',
      '#type' => 'action',
      '#settings' =>
      array (
        'to' => '[account:mail],youremail@email.com',
        'to_args' =>
        array (
          0 => 'account',
        ),
        'from' => 'youremail@email.com',
        'from_args' =>
        array (
        ),
        'subject' => 'Your Account for the Website has been Activated!',
        'subject_args' =>
        array (
        ),
        'message' => 'Dear [account:user],

Your account has been activated for the Website.  You can login using the information that was previously emailed to you by the system.  You can modify your account information at any time by clicking [account_unchanged:site-url][account:account-edit].

If you have any questions, please contact Site Admin at youremail@email.com.',
        'message_args' =>
        array (
          0 => 'account',
          1 => 'account_unchanged',
        ),
      ),
    ),
    '#name' => 'cfg_7',
  ),
)

About this page

Drupal version
Drupal 5.x
Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.