title: PHP Uploader - Problems with UploadDir option
body: <p>Hi everyone and thanks in advance for your support ;)</p>
  
  <p>Im using the plugin <a href="https://github.com/CreativeDream/jQuery.filer" rel="nofollow noreferrer">https://github.com/CreativeDream/jQuery.filer</a>, for PHP Uploader, and in /php/class.uploader.php im trying to change the upload dir in the function below:</p>
  
  <pre><code>    private function initialize($field, $options){
          if(is_array($field) &amp;&amp; in_array($field, $_FILES)){
              $this-&gt;field = $field;
              $this-&gt;field['Field_Name'] = array_search($field, $_FILES);
              $this-&gt;field['Field_Type'] = 'input';
  
              if(!is_array($this-&gt;field['name'])){
              $this-&gt;field = array_merge($this-&gt;field, array("name" =&gt; array($this-&gt;field['name']), "tmp_name"=&gt;array($this-&gt;field['tmp_name']), "type"=&gt;array($this-&gt;field['type']), "error"=&gt;array($this-&gt;field['error']), "size"=&gt;array($this-&gt;field['size'])));
              }
  
              foreach($this-&gt;field['name'] as $key=&gt;$value){ if(empty($value)){ unset($this-&gt;field['name'][$key]); unset($this-&gt;field['type'][$key]); unset($this-&gt;field['tmp_name'][$key]); unset($this-&gt;field['error'][$key]); unset($this-&gt;field['size'][$key]); } }
  
              $this-&gt;field['length'] = count($this-&gt;field['name']);
          }elseif(is_string($field) &amp;&amp; $this-&gt;isURL($field)){
              $this-&gt;field = array("name" =&gt; array($field), "size"=&gt;array(), "type"=&gt;array(), "error"=&gt;array());
              $this-&gt;field['Field_Type'] = 'link';
              $this-&gt;field['length'] = 1;
          }else{
              return false;
          }
  
          if($options != null){
              $this-&gt;setOptions($options);
          }
          $varuser='test';
          //$varuser=$_SESSION['username'];
          $this-&gt;options['uploadDir']="../../../uploads/".$varuser."/";
  
          return $this-&gt;prepareFiles();
      }
  </code></pre>
  
  <p>As you can see, at the end of the function i'm setting the "option" UploadDir like a concat of "../../../uploads/" + $varuser +"/", and using the current definition of $varuser($varuser='test') everything works.</p>
  
  <p>But, my problem start when i try to assign to $varuser my session username variable, i receive an error in the custom.js:91 (/examples/dragdrop/js)</p>
  
  <p>Please, any idea of what is happening?</p>
  
  <p>Thanks ;)</p>