BP_Core_User::__construct( integer $user_id, bool $populate_extras = false )

Class constructor.


Parameters Parameters

$user_id

(integer) (Required) The ID for the user being queried.

$populate_extras

(bool) (Optional) Whether to fetch extra information such as group/friendship counts or not. Default: false.

Default value: false


Source Source

File: bp-core/classes/class-bp-core-user.php

	public function __construct( $user_id, $populate_extras = false ) {
		if ( !empty( $user_id ) ) {
			$this->id = $user_id;
			$this->populate();

			if ( !empty( $populate_extras ) ) {
				$this->populate_extras();
			}
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

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