Commit a4b2bc3b authored by Titouan Soulard's avatar Titouan Soulard

erp5_oauth2_authorisation: get user by id instead of login

That way, we do not require creation of a login at all to use OAuth.
parent 7f3c9584
Pipeline #37669 passed with stage
in 0 seconds
...@@ -1255,7 +1255,7 @@ class OAuth2AuthorisationServerConnector(XMLObject): ...@@ -1255,7 +1255,7 @@ class OAuth2AuthorisationServerConnector(XMLObject):
""" """
portal = self.getPortalObject() portal = self.getPortalObject()
uf = portal.acl_users uf = portal.acl_users
user = uf.getUser(user_id) user = uf.getUserById(user_id)
if not hasattr(user, 'aq_base'): if not hasattr(user, 'aq_base'):
user = user.__of__(uf) user = user.__of__(uf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment