FIX: Keep compatibility with older version of Discourse.

This commit is contained in:
Guo Xiang Tan 2019-05-14 16:39:59 +08:00 committed by GitHub
parent 5a459fbb6e
commit c13a7b6f61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class OAuth2BasicAuthenticator < ::Auth::OAuth2Authenticator
end
def json_walk(result, user_json, prop)
path = SiteSetting.get("oauth2_json_#{prop}_path")
path = SiteSetting.public_send("oauth2_json_#{prop}_path")
if path.present?
segments = path.split('.')
val = walk_path(user_json, segments)