You are here

protected function UserManager::getPictureDirectory in Social Auth 8.2

Same name and namespace in other branches
  1. 3.x src/User/UserManager.php \Drupal\social_auth\User\UserManager::getPictureDirectory()

Returns picture directory if site supports the user picture feature.

Return value

string|bool Directory for user pictures if site supports user picture feature. False otherwise.

1 call to UserManager::getPictureDirectory()
UserManager::downloadProfilePic in src/User/UserManager.php
Downloads the profile picture to Drupal filesystem.

File

src/User/UserManager.php, line 535

Class

UserManager
Manages database related tasks.

Namespace

Drupal\social_auth\User

Code

protected function getPictureDirectory() {
  $field_definitions = $this->entityFieldManager
    ->getFieldDefinitions('user', 'user');
  if (isset($field_definitions['user_picture'])) {
    return $field_definitions['user_picture']
      ->getSetting('file_directory');
  }
  return FALSE;
}