diff options
author | Aleh Hutnikau <hutnikau@1pt.com> | 2016-12-13 18:28:21 +0300 |
---|---|---|
committer | Aleh Hutnikau <hutnikau@1pt.com> | 2016-12-13 18:28:21 +0300 |
commit | 081de5e056b1105a0fc85d813b48e6883f9260dc (patch) | |
tree | 7840095636ceafb99b0e0dab9a78ab193e4fc8e1 | |
parent | b8c2582d0eeeaf36a7dcb0f480c2979f83ecb926 (diff) | |
download | PHPAuth-081de5e056b1105a0fc85d813b48e6883f9260dc.zip PHPAuth-081de5e056b1105a0fc85d813b48e6883f9260dc.tar.gz PHPAuth-081de5e056b1105a0fc85d813b48e6883f9260dc.tar.bz2 |
Fix Auth::addUser() for postgresql db
-rw-r--r-- | Auth.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -531,14 +531,14 @@ class Auth { $return['error'] = true; - $query = $this->dbh->prepare("INSERT INTO {$this->config->table_users} VALUES ()"); + $query = $this->dbh->prepare("INSERT INTO {$this->config->table_users} (isactive) VALUES (0)"); if (!$query->execute()) { $return['message'] = $this->lang["system_error"] . " #03"; return $return; } - $uid = $this->dbh->lastInsertId(); + $uid = $this->dbh->lastInsertId("{$this->config->table_users}_id_seq"); $email = htmlentities(strtolower($email)); if ($sendmail) { |