You are here

function uc_store_customer_search_form_submit in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_store/uc_store.admin.inc \uc_store_customer_search_form_submit()

File

uc_store/uc_store.module, line 906
Contains global Ubercart functions and store administration functionality.

Code

function uc_store_customer_search_form_submit($form_id, $form_values) {
  if (strlen(trim($form_values['first_name'])) == 0) {
    $first_name = '0';
  }
  else {
    $first_name = strtolower(trim($form_values['first_name']));
  }
  if (strlen(trim($form_values['last_name'])) == 0) {
    $last_name = '0';
  }
  else {
    $last_name = strtolower(trim($form_values['last_name']));
  }
  if (strlen(trim($form_values['email'])) == 0) {
    $email = '0';
  }
  else {
    $email = strtolower(trim($form_values['email']));
  }
  drupal_goto('admin/store/customers/search/results/' . $first_name . '/' . $last_name . '/' . $email);
}