Skip to content

Commit

Permalink
dbInsert(): Set mData["id"] and return mData, not id.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemorken committed Dec 16, 2023
1 parent b820fd9 commit 99281b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/mysql/types/user/userTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ protected function dbUpdateExtra()

public function dbInsert()
{
$this->mError = "";
if (!$this->dbValidateInsert())
return null;

Expand Down Expand Up @@ -401,6 +402,7 @@ public function dbInsert()
$this->mMessage .= "Couldn't log in. ";
}
}
$this->mData["id"] = $user_id;
}
else {
$user_id = null;
Expand All @@ -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()
Expand Down

0 comments on commit 99281b8

Please sign in to comment.