public function general()
    {
        $keys = [
            'instance_name',
            'instance_short_name',
            'html_title_suffix',
            'Login__Message__show',
            'Login__Message__text',
            'Login__Message__class',
            'Login__HeartBeat__max_login_time',
            'Email__email_sender_name',
            'Email__email_sender',
            'Auth__max_login_attempts',
            'Auth__failed_login_recognition_time',
            'Auth__block_time',
            'User__has_username',
            'User__has_firstname_lastname',
            'User__allow_timezone_change',
            'User__belongs_to_many_groups'
        ];
        $this->GeneralSettings = $this->loadModel('Wasabi/Core.GeneralSettings');
        $settings = $this->GeneralSettings->getKeyValues(new GeneralSetting(), $keys);
        if ($this->request->is('post') && !empty($this->request->data)) {
            $settings = $this->GeneralSettings->newEntity($this->request->data);
            if (!$settings->errors()) {
                if ($this->GeneralSettings->saveKeyValues($settings, $keys)) {
                    $this->Flash->success(__d('wasabi_core', 'The general settings have been updated.'));
                    $this->redirect(['action' => 'general']);
                    return;
                } else {
                    $this->Flash->error($this->dbErrorMessage);
                }
            } else {
                $this->Flash->error($this->formErrorMessage);
            }
        }
        $this->set('settings', $settings);
    }