Skip to content
Snippets Groups Projects
Commit c46e286b authored by Michael Pratt's avatar Michael Pratt Committed by arc
Browse files

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.
parent 0af14640
No related branches found
No related tags found
No related merge requests found
...@@ -70,11 +70,17 @@ class RedmineOauthController < AccountController ...@@ -70,11 +70,17 @@ class RedmineOauthController < AccountController
# Existing record # Existing record
if user.active? if user.active?
successful_authentication(user) successful_authentication(user)
else
# 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 else
account_pending account_pending
end end
end end
end end
end
def oauth_client def oauth_client
@client ||= OAuth2::Client.new(settings[:client_id], settings[:client_secret], @client ||= OAuth2::Client.new(settings[:client_id], settings[:client_secret],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment