need a help with if:else conditions cck function ruh_microblog_item($node) {
  $profile = content_profile_load('profile', $node-&gt;uid);
  $ava = theme_imagecache('microblog', $profile-&gt;field_photo[0]['filepath']);
  $noava = theme_imagecache('microblog', 'sites/default/files/imagecache/user_block_small/imagefield_default_images/no_photo.png');
  $content .= '&lt;div id="mwrapper"&gt;';
  $content .= l($ava, 'user/' . $node-&gt;uid, array('attributes' =&gt; array('title' =&gt; $profile-&gt;title, 'class' =&gt; 'micro'), 'html' =&gt; 'true'));
  $content .= l($profile-&gt;title, 'microblog/'. $node-&gt;uid, array('attributes' =&gt; array('class' =&gt; 'microname', 'title' =&gt; 'Микроблог - '. $profile-&gt;title)));
  $content .= check_markup($node-&gt;title, $format = 'Full HTML', $check = TRUE);
  $content .= '&lt;div class="clearfix"&gt;&lt;/div&gt;';
  $content .= '&lt;p align="right"&gt;' . l(format_interval((time() - $node-&gt;created), 1, NULL), 'node/'. $node-&gt;nid) . ' назад&lt;/p&gt;';
  $content .= '&lt;/div&gt;';
  $content .= '&lt;br /&gt;';  
  return $content;
}


The code above displays a CCK field (field_photo), but what happens if the user has an empty "field_photo"?
Would the following code work?

if ($profile-&gt;field_photo == TRUE) {
  $content .= l($ava, 'user/' . $node-&gt;uid, array('attributes' =&gt; array('title' =&gt; $profile-&gt;title, 'class' =&gt; 'micro'), 'html' =&gt; 'true'));
}
else {
  $noava = theme_imagecache('microblog', 'sites/default/files/imagecache/user_block_small/imagefield_default_images/no_photo.png');
}
if(!empty($profile-&gt;field_photo)) {...}


Should be able to work for you.