bbp_is_user_active( int $user_id )
Checks if user is active
Description
Parameters
- $user_id
-
(Required) The user ID to check
Return
(bool) True if public, false if not
Source
File: bp-forums/users/capabilities.php
function bbp_is_user_active( $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; // Check spam if ( bbp_is_user_spammer( $user_id ) ) return false; // Check deleted if ( bbp_is_user_deleted( $user_id ) ) return false; // Assume true if not spam or deleted return true; }
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.