-
Notifications
You must be signed in to change notification settings - Fork 14
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
Prevent warnings on empty emails #29
Comments
jpahullo
pushed a commit
to jpahullo/moodle-local_cohortauto
that referenced
this issue
Mar 7, 2024
I finally added the PR #30 for you, ready to consider and review. The CI is blocked until someone review it and allows it to run. Thanks a lot for your time. |
danmarsden
added a commit
that referenced
this issue
Mar 11, 2024
#29 - 401 - prevent warnings on empty email addresses
Thank you so much @danmarsden. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
This is to ask you suport and consider in your plugin that empty email may exist.
Rationale
In our institution we run user sincronization from Moodle against several sources. Not all of these systems are able to require email as mandatory for users. So, it is probable that some cases passes through the systems and arrives into Moodle with user accounts without email.
We are making every now and then pedagogy of the use of those systems to set up always email addresses.
But, it is difficult to remove this problem.
What we face
We love this plugin and commits to the task we ask it perfectly. However, the cli/sync_users.php process throws a lot of warnings related to empty email addresses, from its lib.php, when consider de domain name of the email address.
We see these lines for every single user that has no email:
What we propose
Consider that empty email may happen and proceed the same way, but with empty strings in all those cases.
In particular, we have this patch in our institution:
The result
We have applied locally this patch and works like a charm:
And it does not present any warning about empty email.
If you consider this, we are pleased to provide a PR with it.
Let us know.
The text was updated successfully, but these errors were encountered: