Notifications
Clear all
Topic starter
24/07/2017 6:11 am
I had to make a change to the integration code to deal with deleted users so I decided share what I did since I know integration code will not be a priority. If I deleted a user, their comments would show with a blank author. The current integration code has the following line:
if ($comment->user_id) {
but the problem with that is that all comments that were posted by registered users will have a user_id whether or not the user still exists.
I had to change the code to the following for it to work for deleted users:
if (get_userdata($comment->user_id)) {
Tom reacted
25/07/2017 12:08 pm
Thank you for sharing this change.