mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 20:24:40 +08:00
remove duplicate code
This commit is contained in:
@ -65,16 +65,6 @@ class SessionController < ApplicationController
|
|||||||
current_user.user_profile.card_background
|
current_user.user_profile.card_background
|
||||||
) if current_user.user_profile.card_background.present?
|
) 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?
|
if sso.return_sso_url.blank?
|
||||||
render plain: "return_sso_url is blank, it must be provided", status: 400
|
render plain: "return_sso_url is blank, it must be provided", status: 400
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user