mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 17:13:44 +08:00
FIX: sso_overrides_avatar should override previously set avatar
This commit is contained in:
parent
07660ecedb
commit
0791c2c966
|
@ -146,7 +146,7 @@ class DiscourseSingleSignOn < SingleSignOn
|
|||
sso_record.last_payload = unsigned_payload
|
||||
sso_record.external_id = external_id
|
||||
else
|
||||
Jobs.enqueue(:download_avatar_from_url, url: avatar_url, user_id: user.id) if avatar_url.present?
|
||||
Jobs.enqueue(:download_avatar_from_url, url: avatar_url, user_id: user.id, override_gravatar: SiteSetting.sso_overrides_avatar) if avatar_url.present?
|
||||
user.create_single_sign_on_record(
|
||||
last_payload: unsigned_payload,
|
||||
external_id: external_id,
|
||||
|
@ -180,7 +180,7 @@ class DiscourseSingleSignOn < SingleSignOn
|
|||
avatar_changed = sso_record.external_avatar_url != avatar_url
|
||||
|
||||
if avatar_force_update || avatar_changed || avatar_missing
|
||||
Jobs.enqueue(:download_avatar_from_url, url: avatar_url, user_id: user.id)
|
||||
Jobs.enqueue(:download_avatar_from_url, url: avatar_url, user_id: user.id, override_gravatar: SiteSetting.sso_overrides_avatar)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user