Dev Resources

  • Home
  • Reference
  • BuddyX Theme
  • Functions
  • Hooks
  • Classes
Filter by type:
Search
Browse: Home / Reference / Classes / BP_Signup / BP_Signup::check_user_status()

BP_Signup::check_user_status( int $user_id )

Check a user status (from wp_users) on a non-multisite config.

Contents

  • Description
    • Parameters
    • Return
    • Source
    • Changelog
  • User Contributed Notes

Description #Description


Parameters #Parameters

$user_id

(Required) ID of the user being checked.


Top ↑

Return #Return

(int|bool) The status if found, otherwise false.


Top ↑

Source #Source

File: bp-members/classes/class-bp-signup.php

	public static function check_user_status( $user_id = 0 ) {
		global $wpdb;

		if ( empty( $user_id ) ) {
			return false;
		}

		$user_status = $wpdb->get_var( $wpdb->prepare( "SELECT user_status FROM {$wpdb->users} WHERE ID = %d", $user_id ) );

		/**
		 * Filters the user status of a provided user ID.
		 *
		 * @since 2.0.0
		 *
		 * @param int $value User status of the provided user ID.
		 */
		return apply_filters( 'bp_core_signups_check_user_status', intval( $user_status ) );
	}

Expand full source code Collapse full source code


Top ↑

Changelog #Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

You must log in before being able to contribute a note or feedback.

Proudly powered by WordPress