We use a checkbox to mark profiles as verified.
This means that the custom field will only be recorded if the checkbox has been ticked.
We want to display this on the members profile header and popup
I have tried using the following code
<?php if( $user->getFieldValue('cb_memstate') == "Verified" ){ ?>
<i class="fa fa-diamond"></i> <?php echo $user->getFieldValue('cb_memstate'); ?>
<?php } ?>
This works perfectly where the table contains a record for the field cb_memstate but returns an error when the field doesn't exist for a member.
How can we show this record only if it exists (eg use in-array or isset or whatever)?