summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleh Hutnikau <hutnikau@1pt.com>2016-12-13 18:28:21 +0300
committerAleh Hutnikau <hutnikau@1pt.com>2016-12-13 18:28:21 +0300
commit081de5e056b1105a0fc85d813b48e6883f9260dc (patch)
tree7840095636ceafb99b0e0dab9a78ab193e4fc8e1
parentb8c2582d0eeeaf36a7dcb0f480c2979f83ecb926 (diff)
downloadPHPAuth-081de5e056b1105a0fc85d813b48e6883f9260dc.zip
PHPAuth-081de5e056b1105a0fc85d813b48e6883f9260dc.tar.gz
PHPAuth-081de5e056b1105a0fc85d813b48e6883f9260dc.tar.bz2
Fix Auth::addUser() for postgresql db
-rw-r--r--Auth.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Auth.php b/Auth.php
index b485c9d..8cecc51 100644
--- a/Auth.php
+++ b/Auth.php
@@ -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) {