user_exists_by_id

Description

This method checks if a user exists or not in your site based on the user ID.

Usage

<?php UM()->user()->user_exists_by_id( $user_id ); ?>

Parameters

$user_id

(numeric) (required) A user ID must be passed to check if the user exists

Returns

Returns true if user exists and false if user does not exist.

Examples

Basic Usage

<?php
 $boolean = UM()->user()->user_exists_by_id( 15 );
 if ( $boolean ) {
 // That user exists
 }
 ?>