fix: while creating a new account, check for his existance#13187
Conversation
|
Thanks for the PR |
|
/backport to stable5.10 |
|
would it be possible for you to write a quick test about this check? |
|
What I'm missing
|
I'm going to check.
In my opinion, this cannot be retroactive. What is done, is done.
This implementation just checks that the current user do not register multiple times the same mail account, but no one specified what happens if different users register the same mail account. If allowed: it cannot be unique in the database. If not allowed: this implementation is wrong. |
|
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.) |
The unique index should be on |
Signed-off-by: Roberto Guido <info@madbob.org> fix: checking for existance of an account also when using CLI command Signed-off-by: Roberto Guido <info@madbob.org>
|
I've added the check also for the CLI command. What to do for the database? I've figured out how to create a migration, but if applied it will - of course - fail in instances where duplicated accounts already exist... |

Unsure if the duplication check should span across all existing accounts on the instance, or just those registered by the current user...
Fixes #12042