Compare commits

...

2 Commits

Author SHA1 Message Date
Patrick Cloke 9f3f65771a Rename a variable. 2020-11-17 07:37:47 -05:00
Patrick Cloke c013c83136 Fix comment from review. 2020-11-17 07:35:14 -05:00
1 changed files with 6 additions and 6 deletions

View File

@ -37,10 +37,10 @@ class SsoHandler(BaseHandler):
def render_error(
self, request, error: str, error_description: Optional[str] = None
) -> None:
"""Renders the error template and respond with it.
"""Renders the error template and responds with it.
This is used to show errors to the user. The template of this page can
be found under ``synapse/res/templates/sso_error.html``.
be found under `synapse/res/templates/sso_error.html`.
Args:
request: The incoming request from the browser.
@ -77,14 +77,14 @@ class SsoHandler(BaseHandler):
auth_provider_id,
remote_user_id,
)
registered_user_id = await self.store.get_user_by_external_id(
previously_registered_user_id = await self.store.get_user_by_external_id(
auth_provider_id, remote_user_id,
)
# A match was found, return the user ID.
if registered_user_id is not None:
logger.info("Found existing mapping %s", registered_user_id)
return registered_user_id
if previously_registered_user_id is not None:
logger.info("Found existing mapping %s", previously_registered_user_id)
return previously_registered_user_id
# No match.
return None