Only check email based avatar if email has changed.

This commit is contained in:
Martin Edenhofer 2016-09-08 08:45:28 +02:00
parent 80084c5518
commit 9b352f20e6

View file

@ -802,6 +802,7 @@ returns
return if !email
return if email.empty?
return if email !~ /@/
return if !changes['email'] && updated_at > Time.zone.now - 10.days
# save/update avatar
avatar = Avatar.auto_detection(