You are here

private function SocialProfileTrait::useFullName in Open Social 8.9

Same name and namespace in other branches
  1. 8.5 modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()
  2. 8.6 modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()
  3. 8.7 modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()
  4. 8.8 modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()
  5. 10.3.x modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()
  6. 10.0.x modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()
  7. 10.1.x modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()
  8. 10.2.x modules/social_features/social_profile/src/SocialProfileTrait.php \Drupal\social_profile\SocialProfileTrait::useFullName()

Check if can use the full name for the search.

Allow using the full name for search when the limitation is disabled or user has permission to see the full name.

Return value

bool TRUE if a user can use the full name for the search.

3 calls to SocialProfileTrait::useFullName()
SocialProfileTrait::getUserIdsFromName in modules/social_features/social_profile/src/SocialProfileTrait.php
Get a list of account IDs whose account names begin with the given string.
SocialProfileTrait::sortQuery in modules/social_features/social_profile/src/SocialProfileTrait.php
Sorts the query.
SocialProfileTrait::startQuery in modules/social_features/social_profile/src/SocialProfileTrait.php
Start a Social Profile Mention Query.

File

modules/social_features/social_profile/src/SocialProfileTrait.php, line 33

Class

SocialProfileTrait
Trait SocialProfileTrait.

Namespace

Drupal\social_profile

Code

private function useFullName() {
  return !\Drupal::config('social_profile_privacy.settings')
    ->get('limit_search_and_mention') || \Drupal::currentUser()
    ->hasPermission('social profile privacy always show full name');
}