name_from_id (function)

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

Purpose

Another legacy function that fetches a username from a user id

Location

users/helpers/users.php

Version Information

First Introduced v2.5.0

Parameters

# Parameter Data Type Required Description
1 $id int Yes The user id of the user whose name you wish to fetch.

Returns

Data Type Description of Returned Data
string Returns either a username with its first letter capitalized or "-" if the user does not exist.

Example

$name =name_from_id(1);

Further Documentation:

This is another legacy compatibility function from the UserCake days and does not serve a practical purpose for new development.