You are opening a php tag inside an open php tag so you are actually calling this whole string:
<?php global $current_user; if ( isset($current_user) ) {echo $current_user->user_login;}?>
as a category and you echo it out (wrongly) which is not passing ia as a perameter to query_posts
move it outside the query_posts
call:
global $current_user;
get_currentuserinfo();
query_posts(array('category_name' => $current_user->user_login,'posts_per_page'=>6));
I Would recommend catching up on basic PHP before moving on, and once you got that part down then you should avoid using query_posts
altogether and use either get_posts()
or wp_query
read up on it