Defect #5834 » 0001-Defect-5834-remove-trailing-whitespace-from-mail-bef.patch
| 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
|
||
- « Previous
- 1
- 2
- Next »