What's wrong with this code?

$recipient is brought through a form. This is my code...

<?php

echo $recipient;

$r1 = get_user_by_username($recipient);

$r2 = $r1->getGUID();
?>

and my result is just...

Speedysnail6

it is supposed to display the user guid next to it. What did I do wrong?