You are here

function social_profile_fields_social_user_name_display_suggestions_alter in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()
  2. 8.5 modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()
  3. 8.6 modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()
  4. 8.7 modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()
  5. 10.3.x modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()
  6. 10.0.x modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()
  7. 10.1.x modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()
  8. 10.2.x modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module \social_profile_fields_social_user_name_display_suggestions_alter()

Implements hook_social_user_name_display_suggestions_alter().

If the first name or last name (or both) is not enabled then we alter the display of the full_name suggestion.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.module, line 83
The social profile fields module file.

Code

function social_profile_fields_social_user_name_display_suggestions_alter(array &$suggestions, AccountInterface $account) {
  social_profile_fields_censor_full_name_suggestion($suggestions, $account);
}