Skip to content

Commit

Permalink
fixes (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
Findeton authored Feb 21, 2023
1 parent 81a4a2d commit cb4c362
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion iam/authmethods/m_email_otp.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def register(self, auth_event, request):
# inside check_fields_in_request might modify this
req['active'] = True

msg += check_fields_in_request(req, auth_event)
msg = check_fields_in_request(req, auth_event)
if msg:
LOGGER.error(\
"EmailOtp.register error\n"\
Expand Down
4 changes: 4 additions & 0 deletions iam/authmethods/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ def get_user_match_query(auth_event, user_data, base_query):
query = query & Q(email__iexact=field_data)
elif field_type == 'tlf':
query = query & Q(userdata__tlf=field_data)
elif field_type == 'bool':
query = query & Q(
userdata__metadata__contains={field_name: True}
)
else:
query = query & Q(
userdata__metadata__contains={field_name: field_data}
Expand Down

0 comments on commit cb4c362

Please sign in to comment.