mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Emails are case insensitive
This commit is contained in:
@ -251,7 +251,7 @@ class UsersController < ApplicationController
|
||||
lower_email = Email.downcase(params[:email]).strip
|
||||
|
||||
# Raise an error if the email is already in use
|
||||
if User.where("email = ?", lower_email).exists?
|
||||
if User.find_by_email(lower_email)
|
||||
raise Discourse::InvalidParameters.new(:email)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user