Fix for Adding to search index

  1. <?php
  2.  
  3. function custom_helper_nodeapi($node, $op, $arg = 0) {
  4.   switch ($op) {
  5.     case 'update index':
  6.       if ($node->uid) {
  7.         $user = user_load($node->uid);
  8.         return $user->name;
  9.       }
  10.         if ($node->field_opinion_author_name['0']['value'] != ""){
  11.                 return $node->field_opinion_author_name['0']['value'];
  12.         }
  13.   }
  14. }
  15.  
  16. ?>

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.