best way to setup a rule

Events happening in the community are now at Drupal community events on www.drupal.org.
davipilot's picture

New to Drupal so please be patient with me.

I need a rule to accomplish the following when a user visits a link.
- Add user to a specific role.
- Redirect user to another specified page.
- Make a single change to an entry in one of the database tables.

Can this be done in a single rule or require multiple rules?

Comments

got 2 of 3

davipilot's picture

In a single rule so far I was able to add a user to a specific role and redirect when the user clicked on the link. All I need now is for the action "click on a link" makes a change to a table. I am lost on this one.

further research

davipilot's picture

Furthering my research I keep seeing references to "Execute custom PHP code" as an action choice in Rules, however I never see it as an action choice in rules and have not been able to find any documentation on how to make it a choice.

Help :)

I believe that you have to

fmesco's picture

I believe that you have to have the PHP filter module enabled before this option is visible. It's under Site building> Modules> Core- optional.

that worked!

davipilot's picture

Thank you so much @fmesco. All that time and it was right there in front of me.

Now on to figuring out this php thing.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: