user->find (method)

Return to Knowledgebase

Purpose

Finds if a user exists based on id, username, or email

Location

users/classes/User.php

Parameters

This function does not take any arguments

Example

user->find(2)

Further Documentation:

This method is not used in the UserSpice code, but it is basically checking if a user exists. It can handle 3 types of input.
1. Integer for user id
2. Email
3. String for username
Passing any of those values will return true if a user matching that criteria exists

$check = $user->find(2);
dump($check);



$check = $user->find('bob@aol.com');
dump($check);

and

$check = $user->find('admin');
dump($check);

are all valid inputs.