File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ async def force_password_reset(username: str, password: str) -> None:
3131
3232 await client .a_set_user_password (user_id , password , temporary = True )
3333
34+
3435async def get_user (user_id : str ) -> dict :
3536 """Fetch a user from Keycloak using their user ID."""
3637 client = create_client ()
@@ -47,15 +48,17 @@ async def get_discord_id(user_id: str) -> int | None:
4748
4849 try :
4950 return int (discord_ids [0 ])
50- except ( TypeError , ValueError ) :
51+ except TypeError , ValueError :
5152 return None
5253
54+
5355async def get_user_id (username : str ) -> str | None :
5456 """Fetch a user's Keycloak ID using their username."""
5557 client = create_client ()
5658
5759 return await client .a_get_user_id (username )
5860
61+
5962async def get_user_github_id (username : str ) -> str | None :
6063 """Fetch a users GitHub ID from Keycloak."""
6164 client = create_client ()
You can’t perform that action at this time.
0 commit comments