You are here

function imce_dir_man_path in IMCE Tools 6

Same name and namespace in other branches
  1. 7 imce_dir_man/imce_dir_man.module \imce_dir_man_path()

returns an array representing a user's currently accessible file directories used by the imce uploader If a user has not been restricted in the configuration, . (all directories) is returned

File

imce_dir_man/imce_dir_man.module, line 141
imce_dir_man.module provides functions for managing configuration determining what the imce_dir_man_path() function. This function can be used as php code in the directory setting of an IMCE profile to allow for per user configuration of directory…

Code

function imce_dir_man_path() {
  global $user;
  $dir = db_result(db_query('SELECT dir FROM {imce_dir_man} WHERE uid = %d', $user->uid));
  if (!$dir) {
    $dir = '.';
  }
  return preg_split('/,/', $dir);
}