-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix(user_ldap): retrieve from LDAP first "email shaped" value instead of first value #49316
Conversation
retrieve first "email shaped" value instead of first value Signed-off-by: Thatoo <Thatoo@users.noreply.github.com>
Thank you @solracsf . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense, it seems the User
class is not doing any additional check on the email address being set.
See https://www.conventionalcommits.org/en/v1.0.0/ for conventional commits ref. What I’m wondering is whether it would not make sense to instead import all values as email addresses into the profile, as there can be multiple in there, and log a warning when a value is not a valid email address. |
I'll check your link about conventional commits ref. It is indeed a good idea to retrieve all email shaped values instead of only the first one but I'm not sure how to do so then.
Well, I can take the example that lead me to this PR : In Yunohost LDAP, the first value of the LDAP forward mail category corresponds to the user's name, because the aim, when an e-mail is sent to camille@domaine.tld, is to actually deliver this e-mail to camille (without @domaine.tld), which corresponds to the local user, i.e. the yunohost mailbox, and also to the forward address. So all values from the second value have an email shaped value but not the first one. That's how the idea of this PR came to my mind. |
I created this new PR to answer the conventional commits ref issue of my first (this) PR. If it is ok, then we can close this one I guess. |
Well, you could just ammend this PR, not create a new one... 😿 |
I didn't find how to modify a commit in Github. I didn't want to clone this repo into my computer for so little and meaningless change (just satisfying a normative way of writing) as this repo is very massive (big download = carbon impact).
|
I missed that this PR was open through github UI, you cannot force-push in this case? |
I don't think so, never find how. |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
retrieve from LDAP first "email shaped" value instead of first value
Summary
TODO
Checklist