Purpose
Returns the username of the user. Does not actually echo it.
Location
users/helpers/users.php
Version Information
First Introduced |
v3.0.0 |
See Also:
echouser (function)
Parameters
# |
Parameter |
Data Type |
Required |
Description |
1 |
$id |
int |
Yes |
The user id of the user whose username you wish to fetch |
Returns
Data Type |
Description of Returned Data |
string |
Returns either the username or "Unknown" if a user is not found |
Example
echousername($id)
Further Documentation:
Simply returns the username. This works well when you have echoUser set to something else and you want to override that setting and always show the username. If the user id you pass does not belong to a valid user, it will return "Unknown."