function smbwebclient_moodle()
 {
     global $smb_cfg, $CFG, $USER;
     // Jon Witts Mod 2009060900: if ssl has not been explicitly set, then check Moodle config for loginhttps and set accordingly
     if (!isset($smb_cfg->cfgssl) && (isset($CFG->loginhttps) && $CFG->loginhttps)) {
         $smb_cfg->cfgssl = true;
     }
     // GT Mod 2009080300 - convert deprecated config setting forceDownloads to cfgForceDownloads
     if (isset($smb_cfg->forceDownloads) && !isset($smb_cfg->cfgForceDownloads)) {
         $smb_cfg->cfgForceDownloads = $smb_cfg->forceDownloads;
     }
     $this->criticalError = false;
     // set config
     $this->_setstatic_configvars();
     $this->_setdynamic_configvars();
     // GT Mod 2009080300 - make sure max folder zip size is numeric
     if (!is_float($this->cfgMaxFolderZipSizeMB) && !is_int($this->cfgMaxFolderZipSizeMB)) {
         $this->cfgMaxFolderZipSizeMB = floatval($this->cfgMaxFolderZipSizeMB);
     }
     // call parent constructor
     parent::smbwebclient();
     // set username and login if the user has an encrypted version of their password available (i.e. ldapcapture authentication plugin is installed).
     if (isset($USER->epassword) && $USER->epassword != '') {
         if (class_exists('AesCtr')) {
             $this->setauth();
         }
     }
 }