You are here

public static function Imce::userConf in IMCE 8

Same name and namespace in other branches
  1. 8.2 src/Imce.php \Drupal\imce\Imce::userConf()

Returns processed profile configuration for a user.

1 call to Imce::userConf()
Imce::userFM in src/Imce.php

File

src/Imce.php, line 78

Class

Imce
Imce container class for helper methods.

Namespace

Drupal\imce

Code

public static function userConf(AccountProxyInterface $user = NULL, $scheme = NULL) {
  $user = $user ?: \Drupal::currentUser();
  $scheme = isset($scheme) ? $scheme : \Drupal::config('system.file')
    ->get('default_scheme');
  if ($profile = static::userProfile($user, $scheme)) {
    $conf = $profile
      ->getConf();
    $conf['pid'] = $profile
      ->id();
    $conf['scheme'] = $scheme;
    return static::processUserConf($conf, $user);
  }
}