diff --git a/commons_search.info b/commons_search.info
index 9ec4f99..de636ec 100644
--- a/commons_search.info
+++ b/commons_search.info
@@ -7,7 +7,6 @@ project = commons_search
 dependencies[] = ctools
 dependencies[] = custom_search
 dependencies[] = features
-dependencies[] = rich_snippets
 dependencies[] = search
 dependencies[] = strongarm
 dependencies[] = views
diff --git a/commons_search.install b/commons_search.install
new file mode 100644
index 0000000..5b26689
--- /dev/null
+++ b/commons_search.install
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * Disable rich_snippets module
+ */
+function commons_search_update_7001() {
+  module_disable(array('rich_snippets'));
+}
diff --git a/commons_search.module b/commons_search.module
index 837a8fb..90bce2b 100644
--- a/commons_search.module
+++ b/commons_search.module
@@ -23,6 +23,7 @@ function commons_search_module_implements_alter(&$implementations, $hook) {
  * the enabled search module.
  */
 function commons_search_form_alter(&$form, &$form_state, $form_id) {
+
   if ($form_id == 'search_block_form') {
     // Move the textfield to after the drop down.
     $site_key = 'c-all';
@@ -32,10 +33,12 @@ function commons_search_form_alter(&$form, &$form_state, $form_id) {
       // the change of search engines.
       $site_key = 'o-search_facetapi';
     }
-    else if (module_exists('apachesolr_search')) {
-      // Are we using Apache Solr? If so change the Site search key to reflect
-      // the change of search engines.
-      $site_key = 'o-solr';
+    else {
+      if (module_exists('apachesolr_search')) {
+        // Are we using Apache Solr? If so change the Site search key to reflect
+        // the change of search engines.
+        $site_key = 'o-solr';
+      }
     }
     // Overwrite all options so we only have 3 (at most).
     $form['custom_search_types']['#options'] = array(
@@ -45,10 +48,11 @@ function commons_search_form_alter(&$form, &$form_state, $form_id) {
     $group = FALSE;
     $node = current_path();
     if ((strrpos($node, 'node/') !== FALSE || strrpos($node, 'group/') !== FALSE)
-      && is_numeric(substr($node, strrpos($node, '/')+1))) {
+      && is_numeric(substr($node, strrpos($node, '/') + 1))
+    ) {
       // If we're on a page that looks like a group node, see if it is actually
       // a group node.
-      $node = node_load(substr($node, strrpos($node, '/')+1));
+      $node = node_load(substr($node, strrpos($node, '/') + 1));
       $group = ($node->type == 'group');
     }
     if ($group) {
@@ -58,12 +62,11 @@ function commons_search_form_alter(&$form, &$form_state, $form_id) {
       $form['custom_search_types']["#default_value"] = 'o-commons_search';
       $form_state['search_group_id'] = $node->nid;
     }
-    if (isset($_REQUEST['keys'])) {
+    if (arg(0) == 'search') {
       // If we've already searched, refill the search box with the current
       // search keywords.
-      $form['search_block_form']['#default_value'] = check_plain($_REQUEST['keys']);
+      $form['search_block_form']['#default_value'] = check_plain(arg(2));
     }
-    $form['#submit'][] = 'commons_search_search_form_submit';
   }
 }
 
@@ -73,7 +76,8 @@ function commons_search_form_alter(&$form, &$form_state, $form_id) {
  */
 function commons_search_search_form_submit($form, &$form_state) {
   if ($form_state['values']['custom_search_types'] == 'o-commons_search'
-    && isset($form_state['search_group_id'])) {
+    && isset($form_state['search_group_id'])
+  ) {
     $keys = $form_state['values']['search_block_form'];
     if (module_exists('apachesolr_search')) {
       // Add on a filter to the solr query to only list results within the
@@ -87,13 +91,17 @@ function commons_search_search_form_submit($form, &$form_state) {
       drupal_goto('search/group/' . $form_state['search_group_id'], array('query' => array('keys' => $keys)));
     }
   }
-  else if ($form_state['values']['custom_search_types'] == 'c-user') {
-    // Force update the redirect on User search since Custom Search is weird.
-    $keys = check_plain($form_state['values']['search_block_form']);
-    $form_state['redirect'] = 'search/user/' . $keys;
+  else {
+    if ($form_state['values']['custom_search_types'] == 'c-user') {
+      // Force update the redirect on User search since Custom Search is weird.
+      $keys = check_plain($form_state['values']['search_block_form']);
+      $form_state['redirect'] = 'search/user/' . $keys;
+    }
   }
 }
 
+function commons_search_process_search_result(&$variables) {
+}
 /**
  * Implements hook_preprocess_hook().
  */
@@ -101,7 +109,8 @@ function commons_search_process_search_results(&$variables) {
   $variables['result_count'] = count($variables['results']);
   if (isset($variables['response'])
     && isset($variables['response']->request)
-    && preg_match('/sm_og_group_ref:"node:([0-9]+)"&/', urldecode($variables['response']->request), $match)) {
+    && preg_match('/sm_og_group_ref:"node:([0-9]+)"&/', urldecode($variables['response']->request), $match)
+  ) {
     $group = node_load($match[1]);
     $title = t('Search within !group', array('!group' => '<em>' . $group->title . '</em>'));
     $variables['title'] = $title;
diff --git a/modules/commons_search_core/commons_search_core.install b/modules/commons_search_core/commons_search_core.install
index 48d0e50..23cff87 100644
--- a/modules/commons_search_core/commons_search_core.install
+++ b/modules/commons_search_core/commons_search_core.install
@@ -9,7 +9,7 @@
 function commons_search_core_enable() {
   // Disable Solr search module upon enabling this module.
   if (module_exists('commons_search_solr')) {
-    module_disable(array('commons_search_solr', 'apachesolr_search', 'apachesolr', 'commons_events_solr'), FALSE);
+    module_disable(array('commons_search_solr', 'apachesolr_search', 'apachesolr', 'commons_events_solr', 'commons_search_solr_user'), FALSE);
   }
   // Set active search modules to be only Faceted Navigation and User.
   variable_set('search_active_modules', array(
diff --git a/modules/commons_search_core/commons_search_core.strongarm.inc b/modules/commons_search_core/commons_search_core.strongarm.inc
index 0c6d11f..c7ba10b 100644
--- a/modules/commons_search_core/commons_search_core.strongarm.inc
+++ b/modules/commons_search_core/commons_search_core.strongarm.inc
@@ -16,14 +16,14 @@ function commons_search_core_strongarm() {
   $strongarm->name = 'page_manager_search_disabled_search_facetapi';
   $strongarm->value = FALSE;
   $export['page_manager_search_disabled_search_facetapi'] = $strongarm;
-  
+
   $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'search_active_modules';
   $strongarm->value = array(
     'search_facetapi' => 'search_facetapi',
-    'user' => 'user',
+    'user' => 0,
     'node' => 0,
   );
   $export['search_active_modules'] = $strongarm;
@@ -33,7 +33,7 @@ function commons_search_core_strongarm() {
   $strongarm->name = 'search_default_module';
   $strongarm->value = 'search_facetapi';
   $export['search_default_module'] = $strongarm;
-  
+
   $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
diff --git a/modules/commons_search_solr/asd.diff b/modules/commons_search_solr/asd.diff
new file mode 100644
index 0000000..3386377
--- /dev/null
+++ b/modules/commons_search_solr/asd.diff
@@ -0,0 +1,55 @@
+diff --git a/modules/commons_search_solr/commons_search_solr.strongarm.inc b/modules/commons_search_solr/commons_search_solr.strongarm.inc
+index 60f2436..6162040 100644
+--- a/modules/commons_search_solr/commons_search_solr.strongarm.inc
++++ b/modules/commons_search_solr/commons_search_solr.strongarm.inc
+@@ -20,6 +20,16 @@ function commons_search_solr_strongarm() {
+   $strongarm = new stdClass();
+   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+   $strongarm->api_version = 1;
++  $strongarm->name = 'custom_search_other';
++  $strongarm->value = array(
++    'apachesolr_search' => 'apachesolr_search',
++    'user' => 'user',
++  );
++  $export['custom_search_other'] = $strongarm;
++
++  $strongarm = new stdClass();
++  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
++  $strongarm->api_version = 1;
+   $strongarm->name = 'page_manager_search_disabled_apachesolr_search';
+   $strongarm->value = TRUE;
+   $export['page_manager_search_disabled_apachesolr_search'] = $strongarm;
+@@ -30,7 +40,7 @@ function commons_search_solr_strongarm() {
+   $strongarm->name = 'pm_existing_pages_disabled_solr_search';
+   $strongarm->value = FALSE;
+   $export['pm_existing_pages_disabled_solr_search'] = $strongarm;
+-  
++
+   $strongarm = new stdClass();
+   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+   $strongarm->api_version = 1;
+@@ -40,23 +50,13 @@ function commons_search_solr_strongarm() {
+     'user' => 'user',
+   );
+   $export['search_active_modules'] = $strongarm;
+-  
++
+   $strongarm = new stdClass();
+   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+   $strongarm->api_version = 1;
+   $strongarm->name = 'search_default_module';
+   $strongarm->value = 'apachesolr_search';
+   $export['search_default_module'] = $strongarm;
+-  
+-  $strongarm = new stdClass();
+-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+-  $strongarm->api_version = 1;
+-  $strongarm->name = 'custom_search_other';
+-  $strongarm->value = array(
+-    'apachesolr_search' => 'apachesolr_search',
+-    'user' => 'user',
+-  );
+-  $export['custom_search_other'] = $strongarm;
+ 
+   return $export;
+ }
diff --git a/modules/commons_search_solr/commons_search_solr.install b/modules/commons_search_solr/commons_search_solr.install
index 36f29a9..c1d8e1f 100644
--- a/modules/commons_search_solr/commons_search_solr.install
+++ b/modules/commons_search_solr/commons_search_solr.install
@@ -11,18 +11,13 @@ function commons_search_solr_enable() {
   if (module_exists('commons_search_core')) {
     module_disable(array('commons_search_core'), FALSE);
   }
-  // Set active search modules to be only Solr and User.
-  variable_set('search_active_modules', array(
-    'apachesolr_search' => 'apachesolr_search',
-    'user' => 'user',
-  ));
-  // Set custom search active search modules.
-  variable_set('custom_search_other', array(
-    'apachesolr_search' => 'apachesolr_search',
-    'user' => 'user',
-  ));
-  // Set default search module for Solr.
-  variable_set('search_default_module', 'apachesolr_search');
+  if (module_exists('search_facetapi')) {
+    module_disable(array('search_facetapi'), FALSE);
+  }
+  // Ensure that Commons Search Solr variables are reverted in cases such as
+  // when switching from Core to Solr search.
+  $revert = array('commons_search_solr' => array('variable', 'apachesolr_search_page'));
+  features_revert($revert);
   cache_clear_all();
   commons_search_solr_create_facets();
 }
diff --git a/modules/commons_search_solr/commons_search_solr.module b/modules/commons_search_solr/commons_search_solr.module
index 91de0e3..fbbfee5 100644
--- a/modules/commons_search_solr/commons_search_solr.module
+++ b/modules/commons_search_solr/commons_search_solr.module
@@ -441,4 +441,51 @@ function commons_search_solr_modules_enabled($modules) {
     // otherwise our Events Solr page has no facets.
     commons_search_solr_create_facets(ACQUIA_SEARCH_ENVIRONMENT_ID);
   }
+  if (in_array('commons_search_solr_user', $modules)) {
+    // We disable core user search with of Solr user search, via the
+    // search_active_modules variable which is exporter by commons_search_solr
+    // and altered in commons_search_solr_user_strongarm_alter().
+    $revert = array('commons_search_solr' => array('variable'));
+    features_revert($revert);
+  }
+}
+
+
+/**
+ * Feature module hook. Invoked on a Feature module after that module is
+ * enabled.
+ *
+ * @param $component
+ *   String name of the component that has just been enabled.
+ */
+function commons_search_solr_post_features_enable_feature($component) {
+  if ($component == 'apachesolr_search_page') {
+    features_revert(array('commons_search_solr' => array('apachesolr_search_page')));
+  }
+}
+
+
+/**
+ * Implements hook_modules_disabled().
+ */
+function commons_search_solr_modules_disabled($modules) {
+  if (in_array('commons_search_solr_user', $modules)) {
+    // We disable core user search with of Solr user search, via the
+    // search_active_modules variable which is exporter by commons_search_solr
+    // and altered in commons_search_solr_user_strongarm_alter().
+    $revert = array('commons_search_solr' => array('variable'));
+    features_revert($revert);
+  }
+}
+
+
+function commons_search_solr_apachesolr_process_results(&$results, DrupalSolrQueryInterface $query) {
+  foreach($results AS $rkey => $result) {
+    if ($results[$rkey]['fields']['entity_type'] == 'node') {
+      $results[$rkey]['snippet'] = drupal_render(node_view(node_load($results[$rkey]['fields']['entity_id']), 'teaser'));
+    }
+    if ($results[$rkey]['fields']['entity_type'] == 'user') {
+      $results[$rkey]['snippet'] = drupal_render(user_view(user_load($results[$rkey]['fields']['entity_id']), 'search_results'));
+    }
+  }
 }
diff --git a/modules/commons_search_solr_user/commons-search-solr-user-results.tpl.php b/modules/commons_search_solr_user/commons-search-solr-user-results.tpl.php
new file mode 100644
index 0000000..2fe9ad2
--- /dev/null
+++ b/modules/commons_search_solr_user/commons-search-solr-user-results.tpl.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation for displaying solr user search results.
+ *
+ * Available variables:
+ * - $results: All results.
+ * - $title: The title for the grouping of content.
+ *
+ *
+ * @see template_preprocess_commons_search_solr_user_results()
+ *
+ * @ingroup themeable
+ */
+?>
+
+<div class="<?php print $classes; ?>"<?php print $attributes; ?>>
+  <h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
+  <div<?php print $content_attributes; ?>>
+    <?php print render($content); ?>
+  </div>
+</div>
diff --git a/modules/commons_search_solr_user/commons_search_solr_user.apachesolr_search_defaults.inc b/modules/commons_search_solr_user/commons_search_solr_user.apachesolr_search_defaults.inc
new file mode 100644
index 0000000..9c742d7
--- /dev/null
+++ b/modules/commons_search_solr_user/commons_search_solr_user.apachesolr_search_defaults.inc
@@ -0,0 +1,37 @@
+<?php
+/**
+ * @file
+ * commons_search_solr_user.apachesolr_search_defaults.inc
+ */
+
+/**
+ * Implements hook_apachesolr_search_default_searchers().
+ */
+function commons_search_solr_user_apachesolr_search_default_searchers() {
+  $export = array();
+
+  $searcher = new stdClass();
+  $searcher->disabled = FALSE; /* Edit this to true to make a default searcher disabled initially */
+  $searcher->api_version = 3;
+  $searcher->page_id = 'user_search';
+  $searcher->label = 'User Search';
+  $searcher->description = 'User Search';
+  $searcher->search_path = 'people';
+  $searcher->page_title = 'People';
+  $searcher->env_id = 'solr';
+  $searcher->settings = array(
+    'fq' => array(
+      0 => 'entity_type:user',
+    ),
+    'apachesolr_search_custom_enable' => 1,
+    'apachesolr_search_search_type' => 'custom',
+    'apachesolr_search_per_page' => 12,
+    'apachesolr_search_browse' => 'none',
+    'apachesolr_search_spellcheck' => 1,
+    'apachesolr_search_search_box' => 1,
+    'apachesolr_search_allow_user_input' => 0,
+  );
+  $export['user_search'] = $searcher;
+
+  return $export;
+}
diff --git a/modules/commons_search_solr_user/commons_search_solr_user.features.inc b/modules/commons_search_solr_user/commons_search_solr_user.features.inc
new file mode 100644
index 0000000..0d862f2
--- /dev/null
+++ b/modules/commons_search_solr_user/commons_search_solr_user.features.inc
@@ -0,0 +1,15 @@
+<?php
+/**
+ * @file
+ * commons_search_solr_user.features.inc
+ */
+
+/**
+ * Implements hook_ctools_plugin_api().
+ */
+function commons_search_solr_user_ctools_plugin_api() {
+  list($module, $api) = func_get_args();
+  if ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") {
+    return array("version" => "3");
+  }
+}
diff --git a/modules/commons_search_solr_user/commons_search_solr_user.features.menu_links.inc b/modules/commons_search_solr_user/commons_search_solr_user.features.menu_links.inc
new file mode 100644
index 0000000..28c3825
--- /dev/null
+++ b/modules/commons_search_solr_user/commons_search_solr_user.features.menu_links.inc
@@ -0,0 +1,36 @@
+<?php
+/**
+ * @file
+ * commons_search_solr_user.features.menu_links.inc
+ */
+
+/**
+ * Implements hook_menu_default_menu_links().
+ */
+function commons_search_solr_user_menu_default_menu_links() {
+  $menu_links = array();
+
+  // Exported menu link: main-menu:people
+  $menu_links['main-menu:people'] = array(
+    'menu_name' => 'main-menu',
+    'link_path' => 'people',
+    'router_path' => 'people',
+    'link_title' => 'People',
+    'options' => array(
+      'attributes' => array(),
+    ),
+    'module' => 'commons_search_solr_user',
+    'hidden' => 0,
+    'external' => 0,
+    'has_children' => 0,
+    'expanded' => 0,
+    'weight' => 5,
+    'customized' => 1,
+  );
+  // Translatables
+  // Included for use with string extractors like potx.
+  t('People');
+
+
+  return $menu_links;
+}
diff --git a/modules/commons_search_solr_user/commons_search_solr_user.info b/modules/commons_search_solr_user/commons_search_solr_user.info
new file mode 100644
index 0000000..28707fd
--- /dev/null
+++ b/modules/commons_search_solr_user/commons_search_solr_user.info
@@ -0,0 +1,16 @@
+name = Commons Search Solr User
+description = Provides user entity indexing capabilities to Apache Solr, and search functionality
+core = 7.x
+package = Commons - Search
+php = 5.2.4
+project = commons_search_solr_user
+dependencies[] = apachesolr_search
+dependencies[] = apachesolr_user
+dependencies[] = commons_search_solr
+dependencies[] = ctools
+dependencies[] = features
+dependencies[] = menu
+features[apachesolr_search_page][] = user_search
+features[ctools][] = apachesolr_search:apachesolr_search_defaults:3
+features[features_api][] = api:1
+features[menu_links][] = main-menu:people
\ No newline at end of file
diff --git a/modules/commons_search_solr_user/commons_search_solr_user.install b/modules/commons_search_solr_user/commons_search_solr_user.install
new file mode 100644
index 0000000..2f7ec54
--- /dev/null
+++ b/modules/commons_search_solr_user/commons_search_solr_user.install
@@ -0,0 +1,40 @@
+<?php
+/**
+ * @file
+ * Commons Search Solr User install script.
+ */
+
+/**
+ * Implements hook_install().
+ */
+function commons_search_solr_user_install() {
+  db_update('system')
+    ->fields(array(
+      'weight' => 150,
+    ))
+    ->condition('name', 'commons_search_solr_user')
+    ->execute();
+}
+
+/**
+ * Implements hook_enable().
+ */
+function commons_search_solr_user_enable() {
+  // Commons_search_solr_user alters the search_active_modules variable
+  // defined by commons_search_solr. Now that it's disabled, let's revert it.
+  $revert = array('commons_search_solr' => array('variable'));
+  features_revert($revert);
+  // We need to tell Solr to index users.
+  db_merge('apachesolr_index_bundles')
+    ->key(array(
+      'env_id' => apachesolr_default_environment(),
+      'entity_type' => 'user',
+      'bundle' => 'user',
+    ))
+    ->fields(array(
+      'env_id' => apachesolr_default_environment(),
+      'entity_type' => 'user',
+      'bundle' => 'user',
+    ))
+    ->execute();
+}
diff --git a/modules/commons_search_solr_user/commons_search_solr_user.module b/modules/commons_search_solr_user/commons_search_solr_user.module
new file mode 100644
index 0000000..d124e8a
--- /dev/null
+++ b/modules/commons_search_solr_user/commons_search_solr_user.module
@@ -0,0 +1,283 @@
+<?php
+/**
+ * @file
+ * Code for the Commons Search Solr User feature.
+ */
+
+include_once 'commons_search_solr_user.features.inc';
+
+/**
+ * Process documents
+ */
+function commons_search_solr_user_apachesolr_index_document_build_user($document, $entity, $env_id) {
+  if (!empty($entity->field_name_first)) {
+    $document->addField('tes_firstname', $entity->field_name_first[LANGUAGE_NONE][0]['value']);
+  }
+  if (!empty($entity->field_name_last)) {
+    $document->addField('tes_lastname', $entity->field_name_last[LANGUAGE_NONE][0]['value']);
+  }
+  $document->addField('tes_username', $entity->name);
+}
+
+function commons_search_solr_user_apachesolr_query_alter($query) {
+  // Search in partial usernames.
+  $query->addParam('qf', 'tes_firstname');
+  $query->addParam('qf', 'tes_lastname');
+  $query->addParam('qf', 'tes_username');
+}
+
+/**
+ * Implements hook_theme().
+ */
+function commons_search_solr_user_theme($existing, $type, $theme, $path) {
+  return array(
+    'commons_search_solr_user_results' => array(
+      'variables' => array(
+        'title' => '',
+        'results' => array(),
+      ),
+      'template' => 'commons-search-solr-user-results',
+    ),
+  );
+}
+
+/**
+ * Processes filters results based on flagged state and processes user ids.
+ *
+ * @return
+ *   Array of renderable user profiles.
+ */
+function commons_search_solr_user_get_results($user_ids) {
+  // Process the results.
+  $out_results = array();
+  $flagged = TRUE;
+  if (empty($_GET['flagged'])) {
+    $flagged = FALSE;
+  }
+  foreach ($user_ids as $result) {
+    if (!is_integer($result)) {
+      continue;
+    }
+    if ($account = user_load($result)) {
+      $flag = flag_get_flag('commons_follow_user');
+      if ($flagged && $flag && !$flag->is_flagged($account->uid)) {
+        continue;
+      }
+      $out_results[] = user_view($account, 'search_results');
+    }
+  }
+
+  return $out_results;
+}
+
+/**
+ * Implements hook_strongarm_alter().
+ */
+function commons_search_solr_user_strongarm_alter(&$items) {
+  // Commons_search_solr_user replaces core user search, so remove it
+  // from the list of active search modules.
+  if (!empty($items['search_active_modules']->value['user'])) {
+    unset($items['search_active_modules']->value['user']);
+  }
+}
+
+/**
+ * Implements hook_apachesolr_search_page_alter().
+ */
+function commons_search_solr_user_apachesolr_search_page_alter(&$build, $search_page) {
+  if ($search_page['page_id'] == 'user_search'
+    && isset($build['search_results']['#markup'])
+    && empty($build['search_form']['basic']['keys']['#default_value'])
+  ) {
+    // If the #markup item is set, it usually means we have no Solr results.
+    // So lets just fetch all users that are active, and display those.
+    $users = new EntityFieldQuery();
+    $results = $users->entityCondition('entity_type', 'user')
+      ->propertyCondition('status', 1)
+      ->pager(12, 1)
+      ->execute();
+    $user_ids = array_keys($results['user']);
+
+    $out_results = commons_search_solr_user_get_results($user_ids);
+
+    // Build renderable arrays for display.
+    if (!empty($out_results)) {
+      $build['search_results'] = array(
+        '#theme' => 'commons_search_solr_user_results',
+        '#title' => t('People directory'),
+        '#results' => $out_results,
+      );
+      $build['pager'] = array(
+        // As nice as it would be to make this use #theme, it is a bit more
+        // trouble than it is worth to process $user->pager to conform to
+        // renderable array standards. A custom theme suggestion should work
+        // for most, if not all, situations for theme overrides.
+        '#markup' => theme('pager__commons_search_solr_user', $users->pager),
+      );
+    }
+  }
+}
+
+function commons_search_solr_user_user_view_alter(&$build) {
+  if ($build['#view_mode'] == 'search_results') {
+    $build['username'] = theme('username', array('account' => $build['#account']));
+    $user_picture_uri = !empty($build['#account']->picture) ? $build['#account']->picture->uri : variable_get('user_picture_default', '');
+    $build['user_picture']['#markup'] = l(theme('image_style', array(
+      'style_name' => '50x50',
+      'path' => $user_picture_uri
+    )), 'user/' . $build['#account']->uid, array('html' => TRUE));
+
+    if (!empty($build['#account']->og_user_node[LANGUAGE_NONE])) {
+      $build['group_membership'] = array();
+      foreach ($build['#account']->og_user_node[LANGUAGE_NONE] AS $og_node) {
+        $gnode = node_load($og_node['target_id']);
+        $group_contrib[$gnode->nid] = l($gnode->title, 'node/' . $gnode->nid);
+      }
+      $build['group_membership'] = implode(', ', $group_contrib);
+    }
+  }
+}
+
+/**
+ * Implements hook_entity_info_alter().
+ */
+function commons_search_solr_user_entity_info_alter(&$entity_info) {
+  // Create a search results display mode for user entities.
+  $entity_info['user']['view modes']['search_results'] = array(
+    'label' => t('Search results'),
+    'custom settings' => TRUE,
+  );
+}
+
+/**
+ * Implements hook_form_FORM_ID_alter().
+ */
+function commons_search_solr_user_form_alter(&$form, &$form_state, $form_id) {
+  if ($form_id == 'search_block_form') {
+    unset($form['custom_search_types']['#options']['c-user']);
+    $form['custom_search_types']['#options']['s-user'] = t('People');
+    if (strtolower(arg(0)) == 'people') {
+      $form['search_block_form']['#default_value'] = arg(1);
+      $other_options = $form['custom_search_types']['#options'];
+      $form['custom_search_types']['#options'] = array_merge(array('s-user' => t('People')), $other_options);
+    }
+    $submits = (array) $form['#submit'];
+    $form['#submit'] = array('commons_search_solr_user_search_submit') + $submits;
+  }
+}
+
+function commons_search_solr_user_form_apachesolr_search_custom_page_search_form_alter(&$form, &$form_state) {
+  if ($form['#search_page']['page_id'] == 'user_search') {
+    $form['#attributes']['class'][] = 'user-search-form';
+    $form['basic']['flagged'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Following'),
+      '#default_value' => (empty($_GET['flagged']) ? FALSE : TRUE),
+      '#attributes' => array('onclick' => 'this.form.submit();'),
+    );
+    $form['basic']['retain-filters']['#type'] = 'hidden';
+    $form['basic']['retain-filters']['#value'] = 0;
+    $form['basic']['keys']['#title'] = t('Limit to');
+    $form['basic']['submit']['#value'] = t('Search');
+    $form['basic']['submit']['#weight'] = 10;
+    $form['#submit'][] = 'commons_search_solr_user_user_search_submit';
+  }
+}
+
+function commons_search_solr_user_user_search_submit($form, &$form_state) {
+  $form_state['redirect']['1']['query']['flagged'] = $form_state['values']['flagged'];
+}
+
+/**
+ * Submit handler that handles only the redirection to our Solr user directory.
+ */
+function commons_search_solr_user_search_submit($form, &$form_state) {
+  if ($form_state['values']['custom_search_types'] == 's-user') {
+    $user_search_page = apachesolr_search_page_load('user_search');
+    $keys = '/' . check_plain($form_state['values']['search_block_form']);
+    $form_state['redirect'] = $user_search_page['search_path'] . $keys;
+    drupal_goto($form_state['redirect']);
+  }
+}
+
+/**
+ * Implements hook_module_implements_alter().
+ */
+function commons_search_solr_user_module_implements_alter(&$modules, $hook) {
+  switch ($hook) {
+    case 'form_alter':
+      // Move this module to be last for form alterations.
+      $module = $modules['commons_search_solr_user'];
+      unset($modules['commons_search_solr_user']);
+      $modules['commons_search_solr_user'] = $module;
+      break;
+  }
+}
+
+/**
+ * Preprocess user profile.
+ *
+ * @param array $variables
+ */
+function commons_search_solr_user_preprocess_user_profile(&$variables, $hook) {
+  if ($variables['elements']['#view_mode'] == 'search_results') {
+    $variables['theme_hook_suggestions'][] = 'user_profile__search_results';
+  }
+}
+
+/**
+ * Implements hook_preprocess_commons_search_solr_user_results().
+ */
+function commons_search_solr_user_preprocess_commons_search_solr_user_results(&$variables, $hook) {
+  // Add classed to the results header.
+  $variables['title_attributes_array']['class'][] = 'user-search-results-title';
+  $variables['title_attributes_array']['class'][] = 'element-invisible';
+
+  // Add a class to the results wrapper.
+  $variables['content_attributes_array']['class'][] = 'user-search-results-content';
+
+  // Populate the content array.
+  $variables['content'] = array();
+  if (!empty($variables['results'])) {
+    $variables['content']['results'] = $variables['results'];
+  }
+}
+
+/**
+ * Implements hook_process_hook().
+ */
+function commons_search_solr_user_process_search_results(&$variables, $hook) {
+  if ($variables['search_page']['page_id'] == 'user_search') {
+    // We set the title to be blank so it doesn't display 'Search results'.
+    $variables['title'] = ' ';
+
+    // @todo Find a better place for this logic. This is too far down the
+    // chain and should not be happening in preprocess let alone process.
+    $users = $variables['results'];
+    $user_ids = array();
+    foreach ($users as $user) {
+      if ($user['fields']['entity_type'] == 'user') {
+        $user_ids[] = $user['fields']['entity_id'];
+      }
+    }
+
+    $results = commons_search_solr_user_get_results($user_ids);
+
+    if (!empty($results)) {
+      $variables['search_results'] = theme('commons_search_solr_user_results',array('title' => t('User search results'), 'results' => $results));
+    }
+  }
+}
+
+/**
+ * Feature module hook. Invoked on a Feature module after that module is
+ * enabled.
+ *
+ * @param $component
+ *   String name of the component that has just been enabled.
+ */
+function commons_search_solr_user_post_features_enable_feature($component) {
+  if ($component == 'apachesolr_search_page') {
+    features_revert(array('commons_search_solr_user' => array('apachesolr_search_page')));
+  }
+}
