From e4d52d0b154e519e46fbc278a2f6d077ac055362 Mon Sep 17 00:00:00 2001 From: Bernd Konrad Date: Fri, 6 Dec 2024 14:01:59 +0100 Subject: [PATCH] adds `custom_uid_field` and `custom_email_field` to RedmineOauth class. fixes #63 --- lib/redmine_oauth.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/redmine_oauth.rb b/lib/redmine_oauth.rb index 9672074..17d3e7c 100644 --- a/lib/redmine_oauth.rb +++ b/lib/redmine_oauth.rb @@ -197,6 +197,23 @@ def oauth_version '' end end + + def custom_uid_field + if Setting.plugin_redmine_oauth['custom_uid_field'].present? + Setting.plugin_redmine_oauth['custom_uid_field'].strip + else + '' + end + end + + def custom_email_field + if Setting.plugin_redmine_oauth['custom_email_field'].present? + Setting.plugin_redmine_oauth['custom_email_field'].strip + else + '' + end + end + end end