From c46e286b39882447fec8023f0ecb9720b63418f5 Mon Sep 17 00:00:00 2001 From: Michael Pratt <michael@pratt.im> Date: Sun, 3 Aug 2014 20:02:06 -0400 Subject: [PATCH] Add argument to account_pending Redmine 2.4 adds an argument to the account_pending function. Check if this installation is at least version 2.4, and if so, call account_pending with the additional argument. --- app/controllers/redmine_oauth_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/redmine_oauth_controller.rb b/app/controllers/redmine_oauth_controller.rb index 93f928a..dfb32cf 100644 --- a/app/controllers/redmine_oauth_controller.rb +++ b/app/controllers/redmine_oauth_controller.rb @@ -71,7 +71,13 @@ class RedmineOauthController < AccountController if user.active? successful_authentication(user) else - account_pending + # Redmine 2.4 adds an argument to account_pending + if Redmine::VERSION::MAJOR > 2 or + (Redmine::VERSION::MAJOR == 2 and Redmine::VERSION::MINOR >= 4) + account_pending(user) + else + account_pending + end end end end -- GitLab