could not create new user

If you need support with TeamCal Pro (installation, configuration, usage) post your request here.
Post Reply
User avatar
Craxx
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2012-02-07, 21:14
Are you a spam bot?: No

could not create new user

Post by Craxx » 2015-02-06, 19:01

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 ;-)
User avatar
Craxx
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2012-02-07, 21:14
Are you a spam bot?: No

Re: could not create new user

Post by Craxx » 2015-02-07, 20:17

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 ;-)
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 382
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: could not create new user

Post by George » 2015-03-04, 17:30

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) . "', "; 
         }
Post Reply