Project

General

Profile

Defect #2032 ยป email_downcase.diff

diff to make the noted changes - Erik Ordway, 2008-10-14 23:05

View differences:

app/models/mail_handler.rb (working copy)
39 39
  # Processes incoming emails
40 40
  def receive(email)
41 41
    @email = email
42
    @user = User.find_active(:first, :conditions => {:mail => email.from.first})
42
    @user = User.find_active(:first, :conditions => {:mail => email.from.first.downcase})
43 43
    unless @user
44 44
      # Unknown user => the email is ignored
45 45
      # TODO: ability to create the user's account
app/models/user.rb (working copy)
69 69
  def before_save
70 70
    # update hashed_password if password was set
71 71
    self.hashed_password = User.hash_password(self.password) if self.password
72
    self.mail.downcase!
72 73
  end
73 74

  
74 75
  def self.active
    (1-1/1)