Why?
templating programming like that is not what I call beautiful :
if ( is_user_logged_in() ) { wp_nav_menu( array( 'theme_location' => 'logged-in-menu' ) ); } else { wp_nav_menu( array( 'theme_location' => 'logged-out-menu' ) ); }
edit : what I dislike about it is the over-usage of global functions and variables