Skip to main content

is_user_participant

Checking if user is participant of conversation with given ID

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 is participant or false if user is not participant
$is_participant = Better_Messages()->functions->is_user_participant( $thread_id, $user_id );