Using Realnames in other places In Drupal Commons, we're using the Realnames module. Is there a way to extend this module's information to other search box fields? 

For example in the Organic Groups invite (/og/users/??/invite), could my users search for other users by the user's first or last name? That is, in the form og_invite_link_invite_page_form's first field (edit-invitees), how could I search on an individual's Given Name (first name) or Family Name (last name)?

This addition provided what I needed. Basically, I needed to override the $form['invitees'] by using and slighly modifying og_username_helper.module ( http://drupal.org/project/og_username_helper ).

 74     if ($form['#id'] == 'og-invite-link-invite-page-form') {
 75       // print 'in';
 76       // print_r($form['invitees']);
 77       
 78       $form['invitees'] = array(
 79           '#type' =&gt; 'textfield',
 80           '#description' =&gt; t('Lookup a username and add it to the list below.'),
 81           '#autocomplete_path' =&gt; 'og/username_helper/autocomplete',
 82           '#size' =&gt; 40,
 83           '#maxlength' =&gt; 60,
 84           '#weight' =&gt; -2,
 85           '#access' =&gt; $helper_access,
 86           );
 87 
 88       return $form;
 89     }
 90
I've packaged this up into a module to extend the og_username_helper. 

 58 /**
 59  * Extends og_username_helper to Groups Invite Members tab
 60  */
 61 function soc_searchtweak_form_alter(&amp;$form, $form_state, $form_id) {
 62 
 63   $form_changes = array();
 64   $form_changes['og-invite-link-invite-page-form']='invitees';
 65   $form_changes['commons-profile-friend-search-form']='search_text';
 66 
 67 
 68   foreach ($form_changes as $form_id=&gt;$field_id) {
 69 
 70 
 71     if ($form['#id'] == $form_id) {
 72       $form[$field_id] = array(
 73           '#type' =&gt; 'textfield',
 74           '#description' =&gt; t('Lookup a username and add it to the list below.'),
 75           '#autocomplete_path' =&gt; 'og/username_helper/autocomplete',
 76           '#size' =&gt; 40,
 77           '#maxlength' =&gt; 60,
 78           '#weight' =&gt; -2,
 79           '#access' =&gt; $helper_access,
 80           );
 81 
 82       return $form;
 83     }
 84 
 85   }
 86 
 87 
 88 }


The module.info file puts og_username_helper as a dependency. 

1 name = Search Tweak
2 description = Extends og_uesrname_helper in various places
3 core = 6.x
4 
5 
6 dependencies[] = og_username_helper