messages_get_unread_count( int $user_id )

Get the unread messages count for a user.

Description

Parameters

$user_id

(int) (Optional) ID of the user. Default: ID of the logged-in user.

Return

(int)

Source

File: bp-messages/bp-messages-functions.php

function messages_get_unread_count( $user_id = 0 ) {
	return BP_Messages_Thread::get_inbox_count( $user_id );
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.