WP_User::existspublicWP 3.4.0

Determines whether the user exists in the database.

Method of the class: WP_User{}

No Hooks.

Returns

true|false. True if user exists in the database, false if not.

Usage

$WP_User = new WP_User();
$WP_User->exists();

Changelog

Since 3.4.0 Introduced.

WP_User::exists() code WP 6.8.1

public function exists() {
	return ! empty( $this->ID );
}