You are here

public function elFinderVolumeDrupal::owner in elFinder file manager 7.2

Same name and namespace in other branches
  1. 8.2 src/Controller/elFinderVolumeDrupal.php \elFinderVolumeDrupal::owner()
  2. 6.2 inc/elfinder.drupalfs.driver.inc \elFinderVolumeDrupal::owner()
  3. 7.3 inc/elfinder.drupalfs.driver.inc \elFinderVolumeDrupal::owner()

File

inc/elfinder.drupalfs.driver.inc, line 385
elFinder driver for Drupal filesystem.

Class

elFinderVolumeDrupal
@file

Code

public function owner($target) {
  $path = $this
    ->decode($target);
  $file = $this
    ->_drupalfileobject($path);
  if ($file->fid) {
    $owneraccount = user_load($file->uid);

    /* AS */
    $owner = $owneraccount->name;
    $ownerformat = variable_get('elfinder_settings_filesystem_owner_format', '');
    if ($ownerformat != '') {
      $owner = token_replace($ownerformat, array(
        'user' => $owneraccount,
      ));
    }
    return $owner;
  }
  return FALSE;
}