mirror of
https://github.com/redmine/redmine.git
synced 2026-03-04 19:41:25 +01:00
Makes email address case-insensitive in MailHandler (#2032).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1933 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -39,7 +39,7 @@ class MailHandler < ActionMailer::Base
|
||||
# Processes incoming emails
|
||||
def receive(email)
|
||||
@email = email
|
||||
@user = User.find_active(:first, :conditions => {:mail => email.from.first})
|
||||
@user = User.find_active(:first, :conditions => ["LOWER(mail) = ?", email.from.first.to_s.strip.downcase])
|
||||
unless @user
|
||||
# Unknown user => the email is ignored
|
||||
# TODO: ability to create the user's account
|
||||
|
||||
Reference in New Issue
Block a user