php rules

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

Add user to a role based on profile selection

Im trying to make two rules:

  1. add user to 'roleA' if they select 'term1' from a profile selection 'profile_type_business'
  2. add user to 'roleB' if they dont select 'term1' from a profile selection 'profile_type_business'

At the moment, i think that profile selection lists are stored as one string,
eg: term1 term2 term3 term4
and so when i create a new user and select any term, the user gets added to both roles as both conditions would return true:

return $account->profile_type_business == 'term1';
return $account->profile_type_business != 'term1';

Read more
fathershawn's picture

[Solved] Attempting to Build Custom PHP rule

I am building a scheduled publishing rule set. I would like to have a php action that resets the created date on the node to the scheduled publishing date as the node is published. I found a clue in the issue que: http://drupal.org/node/641590

Read more
Subscribe with RSS Syndicate content