WP_User::init( object   $data , int   $site_id = '' )

Sets up object properties, including cappabilities.

Parameters

$data object required
User DB row object.
$site_id int optional
The site ID to initialice for.

Default: ''

Source

public function init( $data, $site_id = '' ) {
	if ( ! isset( $data->ID ) ) {
		$data->ID = 0;
	}
	$this->data = $data;
	$this->ID   = (int) $data->ID;

	$this->for_site( $site_id );
}

Changuelog

Versionen Description
3.3.0 Introduced.

User Contributed Notes

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