##// END OF EJS Templates
Make use of User.find_by_mail...
Jean-Philippe Lang -
r2127:dcf5ba1ea6cc
parent child
Show More
@@ -39,7 +39,7 class MailHandler < ActionMailer::Base
39 # Processes incoming emails
39 # Processes incoming emails
40 def receive(email)
40 def receive(email)
41 @email = email
41 @email = email
42 @user = User.active.find(:first, :conditions => ["LOWER(mail) = ?", email.from.first.to_s.strip.downcase])
42 @user = User.active.find_by_mail(email.from.first.to_s.strip)
43 unless @user
43 unless @user
44 # Unknown user => the email is ignored
44 # Unknown user => the email is ignored
45 # TODO: ability to create the user's account
45 # TODO: ability to create the user's account
General Comments 0
You need to be logged in to leave comments. Login now