Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/handlers/profiles/settings/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func ChangePasswordSubmitHandler(c *gin.Context) {
services.DB.Get(&currentEmail, "SELECT email FROM users WHERE id = ?", ctx.User.ID)

if email != "" && email != currentEmail {
if services.DB.QueryRow("SELECT 1 FROM users WHERE email LIKE ?", email).
if services.DB.QueryRow("SELECT 1 FROM users WHERE email = ?", email).
Scan(new(int)) != sql.ErrNoRows {
messages = append(messages, msg.ErrorMessage{lu.T(c, "This email is already in use!")})
return
Expand Down
2 changes: 1 addition & 1 deletion app/handlers/sessions/register/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func RegisterSubmitHandler(c *gin.Context) {
}

// check whether an user with that email already exists
if services.DB.QueryRow("SELECT 1 FROM users WHERE email LIKE ?", email).
if services.DB.QueryRow("SELECT 1 FROM users WHERE email = ?", email).
Scan(new(int)) != sql.ErrNoRows {
registerResp(c, msg.ErrorMessage{lu.T(c, "An user with that email address already exists!")})
return
Expand Down