1

To preface, I am relatively new to php. I need to use the 'execute custom php' action in the rules module to set the value of one of my user fields, but I haven't been able to figure out how to access that field from the $site variable that is available. I know how to print_r the contents of $site and find what I am looking for from there(and I have used that before in nodes successfully), but since I am in the rules module if I just print_r($site) the result doesn't show up anywhere that I know of. What is a good way to find out the contents of the $site variable?

I apologize if this is not clear!

Eluchel
  • 153
  • 1
  • 8
  • 2
    Don't apologize - make it clear :) – bartektartanus Jul 10 '14 at 17:49
  • Touche :) This is the answer someone else gave on another site (I can't post an answer to my own question for 8 hours since I don't have 10 reputation.) "Maybe you can log it to the screen with [drupal_set_message](https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupal_set_message/7) or to the drupal logs with [watchdog](http://stackoverflow.com/questions/1705840/how-to-log-error-message-in-drupal)." I used drupal_set_message and it worked. – Eluchel Jul 10 '14 at 18:56

1 Answers1

0

This is the answer someone else gave on another site: "Maybe you can log it to the screen with drupal_set_message or to the drupal logs with watchdog." I used drupal_set_message and it worked.

Community
  • 1
  • 1
Eluchel
  • 153
  • 1
  • 8