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)
# Processes incoming emails
def receive(email)
@email = email
@user = User.find_active(:first, :conditions => {:mail => email.from.first})
@user = User.find_active(:first, :conditions => {:mail => email.from.first.downcase})
unless @user
# Unknown user => the email is ignored
# TODO: ability to create the user's account
app/models/user.rb (working copy)
def before_save
# update hashed_password if password was set
self.hashed_password = User.hash_password(self.password) if self.password
self.mail.downcase!
end
def self.active
    (1-1/1)