From 99281b8272001bf6ef4526948a234960afb29c57 Mon Sep 17 00:00:00 2001 From: Arne Morken Date: Sat, 16 Dec 2023 10:49:40 +0100 Subject: [PATCH] dbInsert(): Set mData["id"] and return mData, not id. --- data/mysql/types/user/userTable.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/mysql/types/user/userTable.php b/data/mysql/types/user/userTable.php index fba939f..e274f2b 100644 --- a/data/mysql/types/user/userTable.php +++ b/data/mysql/types/user/userTable.php @@ -372,6 +372,7 @@ protected function dbUpdateExtra() public function dbInsert() { + $this->mError = ""; if (!$this->dbValidateInsert()) return null; @@ -401,6 +402,7 @@ public function dbInsert() $this->mMessage .= "Couldn't log in. "; } } + $this->mData["id"] = $user_id; } else { $user_id = null; @@ -410,7 +412,7 @@ public function dbInsert() return $res; } //error_log($this->getError().":".var_export($user_id,true)); - return $user_id; + return $this->mData; } // dbInsert protected function dbLoginUser()