Commit c7741f56b4178ca32dacbe7295d8b84e17c56825
1 parent
1c67d96d
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
oauth_provider: use environment to find users
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
plugins/oauth_provider/controllers/public/oauth_provider_plugin_public_controller.rb
@@ -3,7 +3,7 @@ class OauthProviderPluginPublicController < PublicController | @@ -3,7 +3,7 @@ class OauthProviderPluginPublicController < PublicController | ||
3 | doorkeeper_for :me | 3 | doorkeeper_for :me |
4 | 4 | ||
5 | def me | 5 | def me |
6 | - user = User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token | 6 | + user = environment.users.find(doorkeeper_token.resource_owner_id) if doorkeeper_token |
7 | render :json => {:id =>user.login, :email => user.email}.to_json | 7 | render :json => {:id =>user.login, :email => user.email}.to_json |
8 | end | 8 | end |
9 | 9 |