import posts at least partially tested, we should do some more work on it - also, a few other bugs have been stomped

This commit is contained in:
2026-02-28 22:58:56 -07:00
parent 210712a58d
commit 9a3860f796
10 changed files with 96 additions and 44 deletions
+3 -1
View File
@@ -757,9 +757,11 @@ func AmCreateNewUser(ctx context.Context, username string, password string, remi
}
// Insert the user record.
ecn := util.GenerateRandomConfirmationNumber()
log.Debugf("generated E-mail confirmation number %d", ecn)
_, err = tx.ExecContext(ctx, `INSERT INTO users (username, passhash, verify_email, lockout, email_confnum,
base_lvl, created, lastaccess, passreminder, description, dob) VALUES (?, ?, 0, 0, ?, ?, NOW(), NOW(), ?, '', ?)`,
username, hashPassword(password), util.GenerateRandomConfirmationNumber(), AmDefaultRole("Global.NewUser").Level(),
username, hashPassword(password), ecn, AmDefaultRole("Global.NewUser").Level(),
reminder, dob)
if err != nil {
return nil, err