You are here

function profile_admin_settings_autocomplete in Drupal 5

Same name and namespace in other branches
  1. 6 modules/profile/profile.admin.inc \profile_admin_settings_autocomplete()
  2. 7 modules/profile/profile.admin.inc \profile_admin_settings_autocomplete()

Retrieve a pipe delimited string of autocomplete suggestions for profile categories

1 string reference to 'profile_admin_settings_autocomplete'
profile_menu in modules/profile/profile.module
Implementation of hook_menu().

File

modules/profile/profile.module, line 841
Support for configurable user profiles.

Code

function profile_admin_settings_autocomplete($string) {
  $matches = array();
  $result = db_query_range("SELECT category FROM {profile_fields} WHERE LOWER(category) LIKE LOWER('%s%%')", $string, 0, 10);
  while ($data = db_fetch_object($result)) {
    $matches[$data->category] = check_plain($data->category);
  }
  print drupal_to_js($matches);
  exit;
}