public function PrivateMessageServiceInterface::getUsersFromString in Private Message 8
Same name and namespace in other branches
- 8.2 src/Service/PrivateMessageServiceInterface.php \Drupal\private_message\Service\PrivateMessageServiceInterface::getUsersFromString()
Get a list of User objects whose account names begin with the given string.
Only accounts that have 'Use private messaging system' permission will be returned, and the viewing user must have both 'View user information' and 'access user profiles' to get any results at all.
Parameters
string $string: The string to search for.
int $count: The maximum number of results to return.
Return value
\Drupal\user\Entity\User[] An array of User accounts whose account names begin with the given string.
1 method overrides PrivateMessageServiceInterface::getUsersFromString()
- PrivateMessageService::getUsersFromString in src/
Service/ PrivateMessageService.php - Get a list of User objects whose account names begin with the given string.
File
- src/
Service/ PrivateMessageServiceInterface.php, line 108
Class
- PrivateMessageServiceInterface
- The interface for the Private Message Service.
Namespace
Drupal\private_message\ServiceCode
public function getUsersFromString($string, $count);