Posted by nflowers1228 on November 16, 2011 at 2:04pm
I need to create a rule that redirects users to their user account edit page if the email field is blank. I have gotten it to work with the redirect, the part I'm having a problem with is having this only show up is the email field is blank. Here is what I put in the Execute Custom PHP Code field:
<?php
return ($account->[account:mail] == 0);
?>I looked at this video: http://www.slurpitup.com/drupal/redirect-user-using-rules-based-on-a-pro..., but using the Truth statement didn't work. So I thought I could just put the code in the PHP area. Any thoughts?

Comments
I don't think the replacement
I don't think the replacement tokens will work in the scope of PHP. I would use the $account object itself like this
return $account->mail == '';Shaun
Sorry
Edited my comment above...the PHP tags should not be included in the Rule PHP code.
That works! thanks!
That works! thanks!
Nancy Flowers-Mangs