Browse Source
Merge pull request #187 from arata-honda/fix-get-user-id
BugFix get_user_id to non case-sensitive
master
Marcos Pereira
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
keycloak/keycloak_admin.py
|
|
@ -410,9 +410,9 @@ class KeycloakAdmin: |
|
|
|
|
|
|
|
:return: user_id |
|
|
|
""" |
|
|
|
|
|
|
|
users = self.get_users(query={"search": username}) |
|
|
|
return next((user["id"] for user in users if user["username"] == username), None) |
|
|
|
lower_user_name = username.lower() |
|
|
|
users = self.get_users(query={"search": lower_user_name}) |
|
|
|
return next((user["id"] for user in users if user["username"] == lower_user_name), None) |
|
|
|
|
|
|
|
def get_user(self, user_id): |
|
|
|
""" |
|
|
|