Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am writing custom Rules action which is supposed to create new instance of a field in database. Action triggered on "new account saved"
I need the field to be labelled as the name of just created account.
Tried to use $account->name but the $account variable seems to be empty...
How can I get that name into the action???
Any help would be greately appreciated...
Thanks :)
Comments
Comment #1
TR CreditAttribution: TR commentedYou need to define account as a context parameter for your action. See rules_user_action_info() in modules/user.rules.inc for some examples.