Skip to content
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

Remove contributor hours when account banned #212

Open
iandunn opened this issue Aug 15, 2022 · 7 comments
Open

Remove contributor hours when account banned #212

iandunn opened this issue Aug 15, 2022 · 7 comments

Comments

@iandunn
Copy link
Member

iandunn commented Aug 15, 2022

When an account is banned, we could automatically remove their contributor hours/teams/company data. That would immediately clear them off team roster and help team reps find active folks easier, and it'd prevent them getting the "inactivity" emails later on.

remove_contributor() could be called for company-sponsored folks, and reset_contribution_data() directly for self-sponsored folks.

Alternatively we could just prevent the emails from being sent to them, and let the future automated deletion process from #169 remove them.

@webtechpooja
Copy link

Quick Question: What if an account is banned temporarily?
What happens in that case? All the access and data from their profile will be removed?
Just a thought came to my mind, that banned might happen in any misunderstanding case and later on, the account could get recovered by any chance.

@iandunn
Copy link
Member Author

iandunn commented Aug 17, 2022

That's a good question. I think most bans are permanent, but in a case where one isn't it should be easy to re-enter the hours/teams. The rest of their profile data would still be in tact.

There's definitely a trade-off there, but it seems better to me than having inaccurate data, or adding more complexity to account for the status of accounts, etc. What do you think?

@webtechpooja
Copy link

Yes, AGree with your point. let's not make it complex, the complex one may confuse the user, whom to include and whom to ignore. The temporary ban is once in a while, we can handle them manually. If the account user will reach out in case of lost data, we can request them for cooperation.

@iandunn
Copy link
Member Author

iandunn commented Jan 2, 2023

Another approach would be to reset the hours when they're about to be sent an inactivity email (#27), instead of immediately. That'd give folks some time to resolve temporary bans, and it'd also make this apply retroactively to folks who have already been banned.

@dd32
Copy link
Member

dd32 commented Jan 3, 2023

AFAIK The emails shouldn't go out, as I believe we block outgoing emails to banned accounts.

Due to how we ban accounts, and how a permanent ban is the same as a temporary ban, calling the remove_*() functions isn't ideal, most particularly as the 5ftf code isn't loaded on those requests most likely.

Perhaps, the company details / available people list, should just be re-calculated regularly and accounts that are marked as unavailable (ie. banned) get skipped during that process.

@iandunn
Copy link
Member Author

iandunn commented Jan 3, 2023

Are you referring to the pre_wp_mail callback in mu-plugins/mail.php? That short-circuits emails to blocked domains, rather than bbp_blocked users.

Extending that to also short-circuit mail to bbp_blocked users might be a good idea, though, since it'd avoid having to add restrictions to everything that sends mail. I wonder if there are any cases where we would want to send mail to a blocked user, though? 🤔

@iandunn
Copy link
Member Author

iandunn commented Mar 1, 2023

2880d80 stopped the emails, but didn't delete the hours/teams data or anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants