Emails are case insensitive

This commit is contained in:
Neil Lalonde
2014-07-14 10:16:24 -04:00
parent 0c8025d513
commit 01a68f8cc7
18 changed files with 105 additions and 13 deletions

View File

@ -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