havok89 / Hoosk

Hoosk Codeigniter CMS
http://hoosk.org
Other
128 stars 87 forks source link

cannot create new user #37

Closed assurur closed 4 years ago

assurur commented 7 years ago

Error Number: 1364

Field 'RS' doesn't have a default value

INSERT INTO hoosk_user (userName, email, password) VALUES ('test', 'test@test.com', '22d61613a8f7120dff19ee54ac97ac48')

Filename: C:/wamp64/www/test/hoosk/hoosk0/models/Hoosk_model.php

Line Number: 128

kingdominc commented 7 years ago

I also ran into this problem. Fixed by modifying Hoosk_model.php and modifying the method: createUser

    function createUser() {
        // Create the user account
        $data = array(
            'userName' => $this->input->post('username'),
            'email' => $this->input->post('email'),
            'password' => md5($this->input->post('password').SALT),
            'RS' => '' //value is required - set to an empty string
        );
        $this->db->insert('hoosk_user', $data);
    }