Drupal 7, show drupal blocks only on specific pages with PHP code?
How the $username variable's value will be available there?
If you want to use current logged in user, write it like 
global $user;
and check $user-&gt;name instead of $username.