Back to top

添加新评论

Update for D7

Comment: 

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:

<?php
$public
= field_get_items('user', user_load(arg(1)), 'field_public_profile');
return
$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.