bbp_is_user_inactive( int $user_id )

Checks if user is not active.

Description

Parameters

$user_id

(int) (Required) The user ID to check. Defaults to current user ID

Return

(bool) True if inactive, false if active

Source

File: bp-forums/users/capabilities.php

function bbp_is_user_inactive( $user_id = 0 ) {

	// Default to current user
	if ( empty( $user_id ) && is_user_logged_in() )
		$user_id = bbp_get_current_user_id();

	// No user to check
	if ( empty( $user_id ) )
		return false;

	// Return the inverse of active
	return !bbp_is_user_active( $user_id );
}

Changelog

Changelog
Version Description
bbPress (r3502) 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.