protected function loadSettingsData(&$data)
    {
        $query = "SELECT\n";
        
        $query .= implode(", ", array_keys($this->settings_fields)) . "\n";
        
        $query .= "FROM " . $this->user_table . "\n";
        
        $query .= $this->getWhereClause();
        
        if (!$this->dbworker->execute_query($query)) {
            throw new \Exception($this->dbworker->get_last_error() . "\n\n" . $this->dbworker->get_last_query(), "system_error");
        }
        
        if ($this->dbworker->fetch_row()) {
            foreach ($this->settings_fields as $field => $type) {
                $data[$field] = $this->dbworker->field_by_name($field);
                
                if ($type == DBWorker::DB_DATE || $type == DBWorker::DB_DATETIME) {
                    $data[$field] = strtotime($data[$field]);
                }
            }
        }
        
        $this->dbworker->free_result();
        
        return true;
    }