rcmail_inst = rcmail::get_instance(); $this->load_config(); $this->load_con_config(); $this->soap = new SoapClient(null, array('location' => $this->rcmail_inst->config->get('soap_url').'index.php', 'uri' => $this->rcmail_inst->config->get('soap_url'))); $this->add_hook('startup', array($this, 'startup')); $this->add_hook('authenticate', array($this, 'authenticate')); $this->add_hook('template_object_loginform', array($this, 'template_object_loginform')); } function load_config() { $config = $this->home.'/config/config.inc.php'; if(file_exists($config)) { if(!$this->rcmail_inst->config->load_from_file($config)) raise_error(array('code' => 527, 'type' => 'php', 'message' => "Failed to load config from $config"), true, false); } else if(file_exists($config . ".dist")) { if(!$this->rcmail_inst->config->load_from_file($config . '.dist')) raise_error(array('code' => 527, 'type' => 'php', 'message' => "Failed to load config from $config"), true, false); } } function load_con_config() { $config = $this->api->dir.'ispconfig3_account/config/config.inc.php'; if(file_exists($config)) { if(!$this->rcmail_inst->config->load_from_file($config)) raise_error(array('code' => 527, 'type' => 'php', 'message' => "Failed to load config from $config"), true, false); } else if(file_exists($config . ".dist")) { if(!$this->rcmail_inst->config->load_from_file($config . '.dist')) raise_error(array('code' => 527, 'type' => 'php', 'message' => "Failed to load config from $config"), true, false); } } function startup($args) { if (empty($args['action']) && empty($_SESSION['user_id']) && !empty($_POST['_user']) && !empty($_POST['_pass'])) $args['action'] = 'login'; return $args; } function template_object_loginform($args) { $args['content'] = str_replace("