Uh oh!
There was an error while loading. Please reload this page.
fix: do not send daily digest email to user who is disabled - #1803
Conversation
Activity | ||||||||||||||||||||||||||||
| Project | Activity |
| Branch Review | fix/834/dont-sent-digest-email-to-disabled-user |
| Run status | |
| Run duration | 02m 56s |
| Commit | |
| Committer | yemkareems |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
0 | |
1 | |
0 | |
0 | |
10 | |
| View all changes introduced in this branch ↗︎ | |
come-nc
left a comment
There was a problem hiding this comment.
Would it be possible to instead take an IUser object in sendDigestForUser and check the enabled state in parent method sendDigests ?
That would allow to also not update the activity.digest config value for disabled users, as that may be confusing. Would also be a bit better in performance to bail out earlier for disabled users.
nickvergessen
commented
Sep 24, 2024
I was wondering if we should even call $this->config->setUserValue($user->getUID(), 'activity', 'activity_digest_last_send', (string)$lastActivityId);so after re-enabling the user is not spamed with old legacy info from the day they got disabled. |
yemkareems
commented
Sep 25, 2024
Hi @nickvergessen , @come-nc Do we need to do this for disabled user. I see there is a ACTIVITY_LIMIT and first time after re enabling user the notifications ll be cluttered and after that it should be fine. Please let me know and i ll do it accordingly |
Hi @come-nc , @nickvergessen I will add the user disabled check in sendDigests method as Côme suggested but will also add one updateLastSentForUser which will do |
Hi @come-nc, @nickvergessen I have done this change as requested but however i do not see a entry in oc_preferences for the disabled user(jane). I see the mail has gone out for admin user and only entry for admin user and not for the disabled user jane for whom i did some file rename just before disabling. Checking it locally now what is going wrong |
nickvergessen
commented
Sep 26, 2024
Could you push, so we can see what your code is? |
Uh oh!
There was an error while loading. Please reload this page.
come-nc
left a comment
There was a problem hiding this comment.
Good apart from 2 small changes.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
… is not used Signed-off-by: yemkareems <yemkareems@gmail.com>
Signed-off-by: yemkareems <yemkareems@gmail.com>
yemkareems
commented
Oct 28, 2024
/backport to stable28 |
yemkareems
commented
Oct 28, 2024
/backport to stable29 |
yemkareems
commented
Oct 28, 2024
/backport to stable30 |
artonge
commented
Oct 28, 2024
/backport to stable28 |
yemkareems
commented
Oct 28, 2024
/backport to stable29 |
1 similar comment
artonge
commented
Oct 28, 2024
/backport to stable29 |
artonge
commented
Oct 28, 2024
/backport to stable30 |

Add a extra check to not send the email to user who is disabled.
In my local i made jane a disabled user
And add the condition. This triggered a email to alice, bob and john. And it did not send the email to jane