I know I can get user information from any user with the getUser( $id )
object:
$user = JFactory::getUser();
if (!$user->guest) {
echo 'You are logged in as:<br />';
echo 'User name: ' . $user->username . '<br />';
echo 'Real name: ' . $user->name . '<br />';
echo 'User ID : ' . $user->id . '<br />';
}
But is it possible to get the ID of any user based on username (or even better, the real name)? Note that I'm not looking for the current logged in user, but any given user.
Given only the users name, I want to echo something like this:
Jon Doe has user ID: 43
Jane Doe has user ID: 82
Can it be done?