You are here

function apachesolr_access_clean_realm_name in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr_access/apachesolr_access.module \apachesolr_access_clean_realm_name()
  2. 7 apachesolr_access/apachesolr_access.module \apachesolr_access_clean_realm_name()

Helper function - return a safe (PHP identifier) realm name.

@todo See if we can replace this with a native php function

Parameters

string $realm:

Return value

string Clean string without bad characters

2 calls to apachesolr_access_clean_realm_name()
apachesolr_access_apachesolr_index_document_build_node in apachesolr_access/apachesolr_access.module
Implements hook_apachesolr_index_document_build_node()
apachesolr_access_build_subquery in apachesolr_access/apachesolr_access.module
Creates a Solr query for a given user

File

apachesolr_access/apachesolr_access.module, line 216

Code

function apachesolr_access_clean_realm_name($realm) {
  return preg_replace('/[^a-zA-Z0-9_\\x7f-\\xff]/', '_', $realm);
}