Back to top

Add new comment

Update for D7


In Drupal 7,
In Drupal 7, here's the PHP Code to add as a Panels selection rule to test if a profile checkbox is set:

= field_get_items('user', user_load(arg(1)), 'field_public_profile');
$public[0]['value'] == '1';

Note that:

  1. This expects that the arg(1) is the user being viewed.
  2. This expects that your user has a profile field named 'field_public_profile'.

Adjust as necessary.