mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 05:52:49 +08:00
remove duplicate code
This commit is contained in:
parent
1404294a12
commit
2958e17cde
|
@ -65,16 +65,6 @@ class SessionController < ApplicationController
|
|||
current_user.user_profile.card_background
|
||||
) if current_user.user_profile.card_background.present?
|
||||
|
||||
sso.avatar_url = Discourse.store.cdn_url UrlHelper.absolute(
|
||||
"#{Discourse.store.absolute_base_url}/#{Discourse.store.get_path_for_upload(current_user.uploaded_avatar)}"
|
||||
) unless current_user.uploaded_avatar.nil?
|
||||
sso.profile_background_url = UrlHelper.absolute upload_cdn_path(
|
||||
current_user.user_profile.profile_background
|
||||
) if current_user.user_profile.profile_background.present?
|
||||
sso.card_background_url = UrlHelper.absolute upload_cdn_path(
|
||||
current_user.user_profile.card_background
|
||||
) if current_user.user_profile.card_background.present?
|
||||
|
||||
if sso.return_sso_url.blank?
|
||||
render plain: "return_sso_url is blank, it must be provided", status: 400
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user