Page 1 of 1

could not create new user

Posted: 2015-02-06, 19:01
by Craxx
Hy George,

with the new 16 Version i get this error when i create a new user:

Module: db_model.php

Class: Db_model

Function: db_query(), Line 125

Error:

Error: A problem was encountered while executing this query:

INSERT INTO `my_tc_users` (`username`,`password`,`firstname`,`lastname`,`title`,`position`,`group`,`phone`,`mobile`,`email`,`notify`,`notify_group`,`status`,`usertype`,`ut_group`,`privileges`,`bad_logins`,`bad_logins_start`,`last_pw_change`,`birthday`,`idnumber`,`last_login`,`custom1`,`custom2`,`custom3`,`custom4`,`custom5`,`customFree`,`customPopup`) VALUES ('ik','s7MuuIoROZfb2','Ingrid','Test','','','','','','','0','','0','1','','1','0','','2015-02-06 17:59:08',NULL,'',NULL,'','','','','','','')

SQL Error:

Column 'last_login' cannot be null

Execution halted



I tried that also on a new fresh installation....

Do you have some advice
best regards
Craxx ;-)

Re: could not create new user

Posted: 2015-02-07, 20:17
by Craxx
Hy George,

there was a fault in database.
I set in last_login datetime NULL to yes, then it works. After looking in the sample database this should be normal. I donĀ“t know why there was another setting.

I hope this was the right solution?

best regards
Craxx ;-)

Re: could not create new user

Posted: 2015-03-04, 17:30
by George
Now covered by a change in the user_model

Code: Select all

         if ($this->last_login == NULL) { 
            $query .= "`last_login`    = NULL, "; 
         } else { 
            $query .= "`last_login`    = '" . substr($this->last_login, 0, 19) . "', "; 
         }