From 2958e17cde04562c44f689277c9dae5b084cf20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 11 May 2018 12:16:37 +0200 Subject: [PATCH] remove duplicate code --- app/controllers/session_controller.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb index dfee47d632d..2bf3965d2e9 100644 --- a/app/controllers/session_controller.rb +++ b/app/controllers/session_controller.rb @@ -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