This commit is contained in:
2022-02-20 18:31:54 +01:00
parent bd1f302433
commit 16a46dd88a
9 changed files with 88 additions and 27 deletions

View File

@@ -67,11 +67,11 @@ namespace Api {
$this->checkPasswordRequirements($password, $confirmPassword);
}
protected function insertUser($username, $email, $password, $confirmed, $fullName = null) {
protected function insertUser($username, $email, $password, $confirmed, $fullName = "") {
$sql = $this->user->getSQL();
$hash = $this->hashPassword($password);
$res = $sql->insert("User", array("name", "password", "email", "confirmed", "fullName"))
->addRow($username, $hash, $email, $confirmed, $fullName)
->addRow($username, $hash, $email, $confirmed, $fullName ?? "")
->returning("uid")
->execute();