Skip to content

Commit

Permalink
stop writing salt and password_version (added db defaults)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Apr 20, 2024
1 parent 6638e53 commit 35c4fc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/handlers/sessions/register/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func RegisterSubmitHandler(c *gin.Context) {

tx, err := services.DB.Begin()

res, err := tx.Exec(`INSERT INTO users(username, username_safe, password_md5, salt, email, register_datetime, privileges, password_version, latest_activity) VALUES (?, ?, ?, '', ?, ?, ?, 2, ?);`,
res, err := tx.Exec(`INSERT INTO users(username, username_safe, password_md5, email, register_datetime, privileges, latest_activity) VALUES (?, ?, ?, ?, ?, ?, ?);`,
username, uu.SafeUsername(username), pass, email, time.Now().Unix(), common.UserPrivilegePendingVerification, time.Now().Unix())

if err != nil {
Expand Down

0 comments on commit 35c4fc1

Please sign in to comment.