WordPress at a glance
function is not described

WP_User::init() public WP 3.3.0

Sets up object properties, including capabilities.

{} It's a method of the class: WP_User{}

No Hooks.

Return

null. Nothing.

Usage

$WP_User = new WP_User();
$WP_User->init( $data, $site_id );
$data(object) (required)
User DB row object.
$site_id(int)
The site ID to initialize for.

Changelog

Since 3.3.0 Introduced.

Code of WP_User::init() WP 5.7.1

<?php
public function init( $data, $site_id = '' ) {
	$this->data = $data;
	$this->ID   = (int) $data->ID;

	$this->for_site( $site_id );
}