Skip to main content

remove_participant_from_thread

Remove user from existing conversation

REQUIREMENTS

To be able to implement this guide, you need to learn how to insert PHP snippets to your website.

You can find guide here: WP Beginner

<?php
// Returns array of user ids (int), returns empty array if no participants or thread not exists
$user_id = 3;
$thread_id = 6610;


// Returns true if user was removed or false if user was not removed
$user_added = Better_Messages()->functions->remove_participant_from_thread( $thread_id, $user_id );