-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Don't send newsletters to unconfirmed accounts #3781
Conversation
@PierreMesure Please review, thanks |
@mohsinkhansymc Thanks for this pull request! 😄 I'll have a look at it, hopefully next week. In the meantime, could you add a test for the scenario we're trying to fix (sending newsletters to unconfirmed account)? 🙏 Thanks! |
Thanks a lot! Did you do any manual test? Because by looking at the other scopes like:
It doesn't seem like they filter by active user, but booleans like I will have time to try it myself on Friday. |
@PierreMesure The active check is enough as first all the users are fetched and then
This code should work if the said scope sends to all users, but sure you can have a look on Friday |
@javierm Please review the test case, thanks |
Ah, thanks! That answers my question! @mohsinkhansymc your test looks great. I'd say you don't need to test that If @javierm has time to review and merge before Friday, then please do it. Otherwise, I'll try to spend half an hour on it at the end of the week. |
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.
@mohsinkhansymc Thank you very much! 😄 I've left a couple of comments; let me know what you think 😉. I think we're definitely on the right track here 👍.
@javierm I have done the changes you proposed. Thanks |
Before we close this, I'd like to point out that In general, shouldn't we replace all the occurrences of In the cases where we use this method to find users who have already created content or to filter by document number, that might actually slightly increase the performances. |
The Regarding the admin statistics, I don't have a strong opinion; I guess both approaches are valid 🤔. |
Yes, I agree with you that touching I'm curious, would you be able to check how many accounts never confirmed their e-mail address on decide.madrid.es? The query would be
|
@PierreMesure we can have a separate label on the stats page that shows confirmed accounts or we can modify the total users label to |
This is an interesting topic 🤔. Since we're trying to get everything ready for version 1.1, I'd rather be conservative and only change the code affecting newsletters. Feel free to open a new issue and continue this conversation once we release version 1.1, and maybe then we can study the implications of chaging the @mohsinkhansymc For now, it would be awesome if we kept this pull request as it is, except for the suggested change in the all_users method, and then we can merge it and it will be included in version 1.1 🎉. |
Co-Authored-By: Javier Martín <35156+javierm@users.noreply.github.com>
@mohsinkhansymc Thanks a lot! 😄 |
References
Objectives
Prior to this PR, an unconfirmed user was considered as active. After this change a user who has confirmed his account is an active user.