public function PrivateMessageService::validatePrivateMessageMemberUsername in Private Message 8.2
Same name and namespace in other branches
- 8 src/Service/PrivateMessageService.php \Drupal\private_message\Service\PrivateMessageService::validatePrivateMessageMemberUsername()
Determine whether given user is allowed to be used in a thread.
Usernames belonging to accounts that have the 'use private messaging system' permission will be considered valid.
Parameters
string $username: The username to be validated.
Return value
bool
- TRUE if the belongs to an account that has the 'use private messaging system' permission
- FALSE if the account doesn't exist, or does not have the required permission
Overrides PrivateMessageServiceInterface::validatePrivateMessageMemberUsername
File
- src/
Service/ PrivateMessageService.php, line 287
Class
- PrivateMessageService
- The Private Message service for the private message module.
Namespace
Drupal\private_message\ServiceCode
public function validatePrivateMessageMemberUsername($username) {
return $this->mapper
->checkPrivateMessageMemberExists($username);
}