You are here

protected function SimpleFbConnectUserManager::userPictureEnabled in Simple FB Connect 8.2

Same name and namespace in other branches
  1. 8.3 src/SimpleFbConnectUserManager.php \Drupal\simple_fb_connect\SimpleFbConnectUserManager::userPictureEnabled()

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 SimpleFbConnectUserManager::userPictureEnabled()
SimpleFbConnectUserManager::setProfilePic in src/SimpleFbConnectUserManager.php
Downloads and sets user profile picture.

File

src/SimpleFbConnectUserManager.php, line 420
Contains \Drupal\simple_fb_connect\SimpleFbConnectUserManager.

Class

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

Namespace

Drupal\simple_fb_connect

Code

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