You are here

public function PrivateMessageServiceInterface::validatePrivateMessageMemberUsername in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Service/PrivateMessageServiceInterface.php \Drupal\private_message\Service\PrivateMessageServiceInterface::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
1 method overrides PrivateMessageServiceInterface::validatePrivateMessageMemberUsername()
PrivateMessageService::validatePrivateMessageMemberUsername in src/Service/PrivateMessageService.php
Determine whether given user is allowed to be used in a thread.

File

src/Service/PrivateMessageServiceInterface.php, line 163

Class

PrivateMessageServiceInterface
The interface for the Private Message Service.

Namespace

Drupal\private_message\Service

Code

public function validatePrivateMessageMemberUsername($username);