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

Class constructor.


Description Description


Parameters Parameters

$user_id

(Required) The ID for the user being queried.

$populate_extras

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

Default value: false


Top ↑

Source Source

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

136
137
138
139
140
141
142
143
144
145
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.