• Resolved dina_fire

    (@dina_fire)


    When I delete a user from my site, I would like to automatically check the knews subscriber list for a corresponding email and unsubscribe that user. I’ve been looking for an unsubscribe method in knews.php (ie the counterpart to the add_user method) but so far have been unable to locate it. What function or method can I use to programatically remove subscribers?

    https://www.ads-software.com/plugins/knews/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author creverter

    (@creverter)

    You should update the state of user from 2 (confirmed) to 3 (blocked) into the wp_knewsusers table.

    Regards,
    Carles.

    Thread Starter dina_fire

    (@dina_fire)

    Thanks, that did work for me.

    For others who may have this problem, I did this:

    $wpdb->update( 'wp_knewsusers', array( 'state' => 3 ), array( 'email' => $person->user_email ) );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Automatically unsubscribe deleted users?’ is closed to new replies.