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
# update hashed_password if password was set
self.hashed_password = User.hash_password(self.password) if self.password && self.auth_source_id.blank?
end
def before_validation
strip_mail_blanks
end
#strip trailing spaces from mail
def strip_mail_blanks
self.mail = self.mail.to_s.strip
end
def reload(*args)
@name = nil
(2-2/2)