So, it will echo "user" if
1) the $_SESSION['account'] is not set
OR
2) the $SERVER['HTTP_USER_AGENT'] is set AND $SERVER['HTTP_USER_AGENT'] does not contain "yahoo" OR "bing"
So for most users the "$_SERVER['HTTP_USER_AGENT']" is set and they will not likely be "yahoo" or "bing" so this by itself will echo user.
Also most users are not logged in by default, which I am guessing the $_SESSION['account'] is a designed to determine, meaning in most cases this will also echo "user".
Basically there is no circumstance under which any visitor would see anything other that "user".
Hope the break down helps. Its a hard to find bugs that maybe more related to what may or may not have happened prior to that point in your code.