You are here

public function SearchApiAlterUserStatus::supportsIndex in Search API 7

Implements SearchApiAlterCallbackInterface::supportsIndex().

The default implementation always returns TRUE.

Overrides SearchApiAbstractAlterCallback::supportsIndex

File

includes/callback_user_status.inc, line 16
Contains the SearchApiAlterUserStatus class.

Class

SearchApiAlterUserStatus
Filters out blocked user accounts.

Code

public function supportsIndex(SearchApiIndex $index) {
  if ($this
    ->isMultiEntityIndex($index)) {
    return in_array('user', $index->options['datasource']['types']);
  }
  return $index
    ->getEntityType() == 'user';
}