Orphaned Avatars and Cover Photos
-
Hi there,
I’m not 100% sure why, but we have quite a lot of old / orphaned avatars / cover photos since we deleted old / inactive users. Not implying it’s a bug in BP, we started using BP 2 years back, so maybe it was just not implemented fully way back then, or for whatever reason.
We want to get rid of those files by automatically erasing them via Cronjob to make sure we are 100% GDPR compliant.
I came up with this solution and would like to ask you guys to have a quick glance / review if possible. Do you see any problems / errors / bugs with it? Obviously, deleting cannot be reverted and merging a backup back in on a live website would be quite cumbersome.
Anyone who wants to use it, feel free to do so.
https://pastebin.com/aNgE7CwUp.s.: I tried to paste the code right in here. I can’t. So I put it in Pastebin!
Thanks so much guys!
- You must be logged in to reply to this topic.