You are here

public function PrivateMessageMapper::getUserIdsFromString in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  2. 8.2 modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  3. 8.3 modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  4. 8.4 modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  5. 8.5 modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  6. 8.6 modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  7. 8.8 modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  8. 10.3.x modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  9. 10.0.x modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  10. 10.1.x modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()
  11. 10.2.x modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php \Drupal\social_private_message\Mapper\PrivateMessageMapper::getUserIdsFromString()

File

modules/social_features/social_private_message/src/Mapper/PrivateMessageMapper.php, line 20

Class

PrivateMessageMapper
Class PrivateMessageMapper.

Namespace

Drupal\social_private_message\Mapper

Code

public function getUserIdsFromString($string, $count) {
  if ($this->currentUser
    ->hasPermission('access user profiles') && $this->currentUser
    ->hasPermission('use private messaging system')) {
    return $this
      ->getUserIdsFromName($string, $count);
  }
  return [];
}