WP_User::exists()
Determines whether the user exists in the database.
Method of the class: WP_User{}
No Hooks.
Return
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() WP User::exists code WP 6.6.2
public function exists() { return ! empty( $this->ID ); }