Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please add support for case insensitivity matching #35

Open
michaelnguyen-creative opened this issue Oct 22, 2024 · 2 comments
Open

please add support for case insensitivity matching #35

michaelnguyen-creative opened this issue Oct 22, 2024 · 2 comments

Comments

@michaelnguyen-creative
Copy link

michaelnguyen-creative commented Oct 22, 2024

Suggestion: Transform both the email inputs from users & moodle user email to lowercase before performing matching, or include a setting for that

Context: We have been experiencing issues with exact matching method for moodle users with case sensitive emails, for example: [email protected], [email protected], [email protected] etc. should match a single user in moodle instead of matching different users

Thank you

@zyxSheila
Copy link

Hi Michael,

I met this issue as well so I have to change the codes in this line to get users via
$userrecords = $DB->get_records_sql('SELECT * FROM {user} WHERE LOWER(email) = LOWER(:email)', array('email' => $email));

Hope this is useful to you as well.

@michaelnguyen-creative
Copy link
Author

michaelnguyen-creative commented Nov 5, 2024

I’ll definitely try that one—thank you so much, Sheila!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants