WP_User::exists()publicWP 3.4.0

Determines whether the user exists in the database.

Метод класса: WP_User{}

Хуков нет.

Возвращает

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

Использование

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

Список изменений

С версии 3.4.0 Введена.

Код WP_User::exists() WP 6.4.3

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