userIdExists (function)
Last updated: Wed, Jan 4, 2023 3:14 pm
Return to Knowledgebase
Purpose
Check if the provided User ID exists in the users table
Location
users/helpers/users.php
Parameters
# |
Parameter |
Data Type |
Required |
Description |
1 |
$id |
int |
Yes |
The ID of the user to verify |
Returns
Data Type |
Description of Returned Data |
bool |
True/False |
Example
userIdExists(1)
Further Documentation:
$userCheck = userIdExists(1);
if($userCheck) {
echo \"ID 1 exists\";
} else {
echo \"ID 1 does NOT exists\";
}