bbp_get_user_topics_started( int $user_id )

Get the topics that a user created

Description

Parameters

$user_id

(int) (Optional) User id

Return

(array|bool) Results if the user has created topics, otherwise false

Source

File: bp-forums/users/functions.php

function bbp_get_user_topics_started( $user_id = 0 ) {

	// Validate user
	$user_id = bbp_get_user_id( $user_id );
	if ( empty( $user_id ) )
		return false;

	// Try to get the topics
	$query = bbp_has_topics( array(
		'author' => $user_id
	) );

	return apply_filters( 'bbp_get_user_topics_started', $query, $user_id );
}

Changelog

Changelog
Version Description
bbPress (r2660) Introduced.

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.