- Drupal Developer helps you to learn Drupal by example!
- Learn to develop custom Drupal modules and themes for Drupal5, Drupal6, Drupal7 and Drupal8
- Post your Drupal questions and get solutions.
- Its free to join and post!
Set user password using RULES
This CodeLet allows to set the user password during Rule execution, the following process can be used.
a) create user entity ($newuser)
b) set a rules variable $password (use PHP code to generate a random string)
c) execute custom PHP which looks like
This way, you can also use the variable $password in say, an email to the user letting them know what their automatically generated password is.
$edit = array('pass' => $password,);
By brad.curnow on Tue, 18/03/2014 - 12:50pm