Project

General

Profile

Defect #5834 » 0001-Defect-5834-remove-trailing-whitespace-from-mail-bef.patch

Carin Meier, 2010-07-22 06:15

View differences:

app/models/user.rb
73 73
    # update hashed_password if password was set
74 74
    self.hashed_password = User.hash_password(self.password) if self.password && self.auth_source_id.blank?
75 75
  end
76

  
77
  def before_validation
78
    strip_mail_blanks
79
  end
80

  
81
  #strip trailing spaces from mail
82
  def strip_mail_blanks
83
    self.mail = self.mail.to_s.strip
84
  end
76 85
  
77 86
  def reload(*args)
78 87
    @name = nil
(2-2/2)