MyBB Community Forums

Full Version: Username from UID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there anyway that I can get the actual username of a member from their uid?

For example, if I know their uid is 5 is there a method of returning their name, for example..

$name = $username(uid);

Or something like that??
<?php
$user = get_user($uid);
$username = $user['username'];
?>

Try that.
Brilliant!! Thanks Big Grin