Last updated August 26, 2011. Created on January 23, 2011.
Edited by latulipeblanche, eubielicious, apatte, AndrewKWilson. Log in to edit this page.

If you need to use Rules to create a new user after a condition, follow this simple tutorial.

Before you begin:

It is helpful to turn on Debug rule evaluation to see if and where your rule runs into issues (Rules > Settings > Debug rule evaluation).

Always use a valid e-mail address, otherwise a new user will not be created.

Create a new rule:

  1. Navigate to 'Add a new rule' (Rules > Triggered rules > Add a new rule).
  2. Create a Label for your new rule.
  3. Select the event on which you want to evaluate this rule.
  4. With the action to create a new user, define a username, for example, you can use [node:title] for it and [cck:email-raw] for e-mail (this case is a after-save-node-type with cck field for this e-mail).

Additional Information:

Then, the problem is: you can't generate a dull password.

So you need to specify a "send e-mail to user" action at the end and then there at the textarea you use [newuser:password] (check your token replacement value). Or you create a non-variable password, as "admin" (obviously not secure).

You can also add a role to this newly created user.

If you want to avoid using duplicate e-mail addresses, one way to avoid this is to use which disallows duplicates of a CCK email field.

Looking for support? Visit the forums, or join #drupal-support in IRC.