Evening,
I have a rule that is designed to redirect a user to their control profile page if they have not responded to a specific field that has been added to the profile. The rule works as expected so long as they have not responded to that field; they log in and are redirected to the profile page and a message is displayed that they must fill in said field. However, once they have responded to this field, when they log in they are then greeted to a blank page. It might be worth noting that in this case, they are being sent to '/node?destination=node' rather than just '/node' when they log in.
ON event User has logged in
IF
NOT Execute custom PHP code
DO
Page redirect
Show a configurable message on the site
This is the custom PHP code:
$ProfileCheck = content_profile_load('profile',$account->uid);
if($ProfileCheck['field_jam_site_2011'] === NULL){return false;}else{return true;}
Comments
Comment #1
itangalo commentedMy only conclusion on this is that there is something awry in the PHP snippet provided above. Have you tried using dpm() to investigate the content of $ProfileCheck?
You could do the same thing without custom coding, if you use a rule set that first loads the content profile, and in a subsequent rule checks a field value for the profile. If you want it all in one condition, as it is now, I would recommend that you write is as a small rules custom condition rather than executing PHP code from configuration. This will make it much easier to debug and maintain, plus making it safer.
Some information about writing Rules conditions can be found here: http://drupal.org/node/298522
Good luck!
//Johan Falk, NodeOne, Sweden
PS: I'm not maintaining the Rules module, just helping with support questions. You are welcome to ask more questions at http://groups.drupal.org/rules
Comment #1.0
itangalo commentedAdded additional information
Comment #2
jkingsnorth commentedNo further information or response so I'm marking this as complete, but please do reopen the issue against the latest version if you require further assistance.