Remove the .json part from the external_id value when using it to lookup a user.
This commit is contained in:
parent
1f0915bf83
commit
c3f21dcdfc
|
@ -239,7 +239,8 @@ class ApplicationController < ActionController::Base
|
|||
find_opts[:active] = true unless opts[:include_inactive]
|
||||
User.find_by(find_opts)
|
||||
elsif params[:external_id]
|
||||
SingleSignOnRecord.find_by(external_id: params[:external_id]).try(:user)
|
||||
external_id = params[:external_id].gsub(/\.json$/, '')
|
||||
SingleSignOnRecord.find_by(external_id: external_id).try(:user)
|
||||
end
|
||||
raise Discourse::NotFound.new if user.blank?
|
||||
|
||||
|
|
Loading…
Reference in New Issue