Do not auto probe avatars in import mode (to increase import speed).

This commit is contained in:
Martin Edenhofer 2018-02-08 06:35:02 +01:00
parent 3328641834
commit d0e25f2e5b

View file

@ -1088,6 +1088,7 @@ raise 'Minimum one user need to have admin permissions'
end
def avatar_for_email_check
return true if Setting.get('import_mode')
return true if email.blank?
return true if email !~ /@/
return true if !saved_change_to_attribute?('email') && updated_at > Time.zone.now - 10.days