mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:24:35 +08:00
Merge pull request #3163 from rcfox/fix-by-external
Allow periods in the external_id value used in the /users/by-external route.
This commit is contained in:
@ -269,7 +269,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 if user.blank?
|
||||
|
||||
|
Reference in New Issue
Block a user