fetchUserName (function)

Last updated: Fri, Jan 13, 2023 7:42 am
Return to Knowledgebase

Purpose

Returns First and Last Name of user

Location

users/helpers/users.php

Version Information

First Introduced v2.5.0

See Also:

fetchAllUsers (function)
fetchUserDetails (function)

Parameters

# Parameter Data Type Required Description
1 $username = null string No The username you are optionally searching for
2 $token = null string No Legacy. Does nothing if specified
3 $id = null integer No If specified, this will override the function and search for a username by user id.

Returns

Data Type Description of Returned Data
string A concatenation of a user's first and last name into one string or false if the user is not found.

Example

fetchUserName(null,null,1)

Further Documentation:

Returns first and last name of the user concatenated together
fetchUserName(null,null,1);

returns
The Admin
This function is here for compatibility reasons