postgres fix, auto-id column need to be NOT set

This commit is contained in:
Ralf Becker 2006-07-14 19:59:16 +00:00
parent f970ef346f
commit 9ae99b8003

View File

@ -170,6 +170,9 @@ class accounts_backend
if (!isset($to_write['account_pwd'])) $to_write['account_pwd'] = ''; // is NOT NULL!
if (!isset($to_write['account_status'])) $to_write['account_status'] = ''; // is NOT NULL!
// postgres requires the auto-id field to be unset!
if (isset($to_write['account_id']) && !$to_write['account_id']) unset($to_write['account_id']);
if (!in_array($to_write['account_type'],array('u','g')) ||
!$this->db->insert($this->table,$to_write,false,__LINE__,__FILE__)) return false;