WP_User::exists() public WP 3.4.0
Determine whether the user exists in the database.
{} It's a 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. |
Code of WP_User::exists() WP User::exists WP 5.7
public function exists() {
return ! empty( $this->ID );
}