You are here

protected function SocialAuthUserManager::userPictureEnabled in Social Auth 8

Returns whether this site supports the default user picture feature.

We use this method instead of the procedural user_pictures_enabled() so that we can unit test our own methods.

Return value

bool True if user pictures are enabled False otherwise

1 call to SocialAuthUserManager::userPictureEnabled()
SocialAuthUserManager::setProfilePic in src/SocialAuthUserManager.php
Downloads and sets user profile picture.

File

src/SocialAuthUserManager.php, line 643

Class

SocialAuthUserManager
Contains all logic that is related to Drupal user management.

Namespace

Drupal\social_auth

Code

protected function userPictureEnabled() {
  $field_definitions = $this->entityFieldManager
    ->getFieldDefinitions('user', 'user');
  return isset($field_definitions['user_picture']);
}