How do I place content in a user-profile.tpl.php, based on whether a boolean field is true? I am trying to display certain content in the user profile pages of a site based on whether my boolean field 'member' is true. I am currently trying to solve this with an if statement like so.

    if ($user_profile['field_member']['und']['0']['value'] == '1') {

        print ('&lt;p&gt;This is working&lt;/p&gt;');

    }


However this is returning an

'Undefined index: und in include()'

error on the if statement line. I'm not very well versed in working with drupal template files and would appreciate any help.

EDIT: The syntax was incorrect I should of written '#items' instead of 'und'. I discovered this with advisement, through the use of the devel kpr() function which allowed me to view the array contents more easily than a var dump.
You shouldn't access data that way, especially in template files as it's the raw data.

You should use the functions field_get_items &amp; field_view_value