Adding New Users

I’m seeing the same issue when adding new users to the tblusers table that I saw adding new projects to the tbl_project table. The datetime fields don’t get added with Null values. This is the error:

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1292 Incorrect datetime value: ‘’ for column ‘last_login_time’ at row 1. The SQL statement executed was: INSERT INTO tbl_user (username, email, password, last_login_time, create_time, create_user_id, update_time, update_user_id) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7)

The default value in the table is set to NULL.

Try to set them to current timestamp, for example in the beforeSave method of your active record.