File tree Expand file tree Collapse file tree
lib/Cleantalk/ApbctWP/FindSpam/ListTable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,15 +293,21 @@ public function removeSpam($ids)
293293 foreach ( $ ids as $ id ) {
294294 $ user_id = (int )sanitize_key ($ id );
295295
296- // Only act on users that were marked as spam by CleanTalk
297- if ( ! delete_user_meta ($ user_id , 'ct_marked_as_spam ' ) ) {
296+ // Check if user was marked as spam or as bad (without IP/email)
297+ $ is_marked_spam = delete_user_meta ($ user_id , 'ct_marked_as_spam ' );
298+ $ is_bad_user = delete_user_meta ($ user_id , 'ct_bad ' );
299+
300+ // Only act on users that were marked by CleanTalk
301+ if ( ! $ is_marked_spam && ! $ is_bad_user ) {
298302 continue ;
299303 }
300304
301- //Send feedback
302- $ hash = get_user_meta ($ user_id , 'ct_hash ' , true );
303- if ( $ hash ) {
304- ct_feedback ($ hash , 0 );
305+ //Send feedback (only for spam-marked users)
306+ if ( $ is_marked_spam ) {
307+ $ hash = get_user_meta ($ user_id , 'ct_hash ' , true );
308+ if ( $ hash ) {
309+ ct_feedback ($ hash , 0 );
310+ }
305311 }
306312
307313 //Delete user and posts
You can’t perform that action at this time.
0 commit comments