original_string: private function get_file_info_context_user($context, $component, $filearea, $itemid, $filepath, $filename) {
          global $DB, $USER;
          if ($context->instanceid == $USER->id) {
              $user = $USER;
          } else {
              $user = $DB->get_record('user', array('id'=>$context->instanceid));
          }
  
          if (isguestuser($user)) {
              // guests do not have any files
              return null;
          }
  
          if ($user->deleted) {
              return null;
          }
  
          $level = new file_info_context_user($this, $context, $user);
          return $level->get_file_info($component, $filearea, $itemid, $filepath, $filename);
      }
code: private function get_file_info_context_user($context, $component, $filearea, $itemid, $filepath, $filename) {
          global $DB, $USER;
          if ($context->instanceid == $USER->id) {
              $user = $USER;
          } else {
              $user = $DB->get_record('user', array('id'=>$context->instanceid));
          }
  
          if (isguestuser($user)) {
              // guests do not have any files
              return null;
          }
  
          if ($user->deleted) {
              return null;
          }
  
          $level = new file_info_context_user($this, $context, $user);
          return $level->get_file_info($component, $filearea, $itemid, $filepath, $filename);
      }
code_tokens: private function get_file_info_context_user ( $ context , $ component , $ filearea , $ itemid , $ filepath , $ filename ) { global $ DB , $ USER ; if ( $ context -> instanceid == $ USER -> id ) { $ user = $ USER ; } else { $ user = $ DB -> get_record ( 'user' , array ( 'id' => $ context -> instanceid ) ) ; } if ( isguestuser ( $ user ) ) { // guests do not have any files return null ; } if ( $ user -> deleted ) { return null ; } $ level = new file_info_context_user ( $ this , $ context , $ user ) ; return $ level -> get_file_info ( $ component , $ filearea , $ itemid , $ filepath , $ filename ) ; }
docstring: Returns info about the files at User context
  
  @param stdClass $context context object
  @param string $component component
  @param string $filearea file area
  @param int $itemid item ID
  @param string $filepath file path
  @param string $filename file name
  @return file_info|null file_info instance or null if not found or access not allowed
docstring_tokens: Returns info about the files at User context